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
|
# Sanity checks
|
||||||
if ! [ -d "$BACKUPSDIR" ]; then
|
|
||||||
log "Unable to find backups directory: $BACKUPSDIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if ! [ -d "$MODULESDIR" ]; then
|
if ! [ -d "$MODULESDIR" ]; then
|
||||||
log "Unable to find modules directory: $MODULESDIR"
|
log "Unable to find modules directory: $MODULESDIR"
|
||||||
exit 2
|
exit 2
|
||||||
@ -32,6 +28,11 @@ fi
|
|||||||
if [ -r "$MODULESDIR/backuprc" ]; then
|
if [ -r "$MODULESDIR/backuprc" ]; then
|
||||||
source "$MODULESDIR/backuprc"
|
source "$MODULESDIR/backuprc"
|
||||||
fi
|
fi
|
||||||
|
# More sanity checks
|
||||||
|
if ! [ -d "$BACKUPSDIR" ]; then
|
||||||
|
log "Unable to find backups directory: $BACKUPSDIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
# Do the do
|
# Do the do
|
||||||
log "Beginning backups"
|
log "Beginning backups"
|
||||||
for file in "$MODULESDIR"/*; do
|
for file in "$MODULESDIR"/*; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user