aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/backup-sims.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/backup-sims.sh')
-rwxr-xr-xscripts/backup-sims.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/backup-sims.sh b/scripts/backup-sims.sh
new file mode 100755
index 0000000..06cb780
--- /dev/null
+++ b/scripts/backup-sims.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2
3source common.sh
4getPrgDir
5
6for i in $(seq -w 1 99)
7do
8 if [ -e "${PRGDIR}/../../config/sim${i}" ]
9 then
10 pushd ${PRGDIR}/../../config/sim${i} >/dev/null
11 # Find out the size of the last backup, base our later sleep on that, but do it now before backup-sim packs it away.
12 sizeSleep=`sleepPerSize o "$(getSimName ${i})"`
13 ./backup-sim
14 # Sleep for a while, so that there is plenty of time to do the backup,
15 # and we are not keeping the computer very busy if there are lots of sims.
16 sleep ${sizeSleep}
17 popd > /dev/null
18 fi
19done