Create nested directory for backup

/home/myhome/dir1/dir2/ is not a directory
create it now?

The expected result is that it create the folder also if is nested.
master
Alice Ferrazzi 2019-02-09 02:11:46 +09:00 committed by GitHub
parent c2ba9f558d
commit 5a56965a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ if [[ ! -d ${BACKUP_LOCATION} ]]; then
if [[ ! ${CREATE_BACKUP_LOCATION,,} =~ ^(yes|y)$ ]]; then if [[ ! ${CREATE_BACKUP_LOCATION,,} =~ ^(yes|y)$ ]]; then
exit 1 exit 1
else else
mkdir ${BACKUP_LOCATION} mkdir -p ${BACKUP_LOCATION}
chmod 755 ${BACKUP_LOCATION} chmod 755 ${BACKUP_LOCATION}
fi fi
else else