#!/bin/sh
+echo "Ran restore script with $@"
+
+exit 0
+
+export PATH=$rundir:/bin:/usr/bin
+
if [ $# != 1 ]; then
- echo >&2 "Usage: $0 <target-directory>"
- echo >&2 "Example: $0 /"
+ echo >&2 "Usage: $0 <source-directory> <target-directory>"
+ echo >&2 "Example: $0 / /"
exit 1
fi
-tmpdir=/tmp/restore-$(date +%Y%m%d%H%M%S)
-
-export PATH=$tmpdir:/bin:/usr/bin
-
# Get the device with the CD in it here
-device=/dev/hdc
+device=$(mount | grep "on $mountdir " | awk '{print$1}')
+
+cp $mountdir/backups.db $mountdir
for date in $(cat $dbfile | list-dates.sh); do
eject $device