From ed0de24e6bc2cac4c20051070710557055b463d0 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 27 Nov 2016 23:58:40 +1000 Subject: Various little backup system fixes. --- scripts/backup-sims.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/backup-sims.sh') diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh index a449e41..b14acca 100755 --- a/scripts/backup-sims.sh +++ b/scripts/backup-sims.sh @@ -3,17 +3,18 @@ source common.sh getPrgDir -for i in $(seq 99) +for i in $(seq -w 1 99) do j=$(num2name ${i}) if [ -e "${PRGDIR}/../config/${j}" ] then - cd ${PRGDIR}/../config/$j + pushd ${PRGDIR}/../config/${j} >/dev/null # Find out the size of the last backup, base our later sleep on that, but do it now before backup-sim packs it away. sizeSleep=`sleepPerSize o "$(getSimName ${i})"` ./backup-sim # Sleep for a while, so that there is plenty of time to do the backup, # and we are not keeping the computer very busy if there are lots of sims. sleep ${sizeSleep} + popd > /dev/null fi done -- cgit v1.1