Check for backups dir AFTER we might've changed it
This commit is contained in:
parent
2769a78198
commit
ed04787e9b
@ -20,10 +20,6 @@ log() {
|
||||
}
|
||||
|
||||
# Sanity checks
|
||||
if ! [ -d "$BACKUPSDIR" ]; then
|
||||
log "Unable to find backups directory: $BACKUPSDIR"
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -d "$MODULESDIR" ]; then
|
||||
log "Unable to find modules directory: $MODULESDIR"
|
||||
exit 2
|
||||
@ -32,6 +28,11 @@ fi
|
||||
if [ -r "$MODULESDIR/backuprc" ]; then
|
||||
source "$MODULESDIR/backuprc"
|
||||
fi
|
||||
# More sanity checks
|
||||
if ! [ -d "$BACKUPSDIR" ]; then
|
||||
log "Unable to find backups directory: $BACKUPSDIR"
|
||||
exit 1
|
||||
fi
|
||||
# Do the do
|
||||
log "Beginning backups"
|
||||
for file in "$MODULESDIR"/*; do
|
||||
|
Loading…
Reference in New Issue
Block a user