mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-02 10:49:48 +01:00
Always check if user specified path exist
This commit is contained in:
@@ -102,11 +102,11 @@ if echo "${TARGET}" | grep -q '\/'; then
|
||||
GETDIR="${TARGET}"
|
||||
TARGET=$(echo ${TARGET} | awk -F '\/' '{print $NF}')
|
||||
bastille_backupsdir=$(echo ${GETDIR} | sed "s/${TARGET}//")
|
||||
else
|
||||
# Check if backups directory/dataset exist
|
||||
if [ ! -d "${bastille_backupsdir}" ]; then
|
||||
error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if backups directory/dataset exist
|
||||
if [ ! -d "${bastille_backupsdir}" ]; then
|
||||
error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}"
|
||||
fi
|
||||
|
||||
# Check if is a ZFS system
|
||||
|
||||
@@ -377,11 +377,11 @@ if echo "${TARGET}" | grep -q '\/'; then
|
||||
GETDIR="${TARGET}"
|
||||
TARGET=$(echo ${TARGET} | awk -F '\/' '{print $NF}')
|
||||
bastille_backupsdir=$(echo ${GETDIR} | sed "s/${TARGET}//")
|
||||
else
|
||||
# Check if backups directory/dataset exist
|
||||
if [ ! -d "${bastille_backupsdir}" ]; then
|
||||
error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if backups directory/dataset exist
|
||||
if [ ! -d "${bastille_backupsdir}" ]; then
|
||||
error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}"
|
||||
fi
|
||||
|
||||
# Check if archive exist then trim archive name
|
||||
|
||||
Reference in New Issue
Block a user