projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Create the self-extracting archive restore.sh
[backups/.git]
/
scripts
/
restore-script.sh
diff --git
a/scripts/restore-script.sh
b/scripts/restore-script.sh
old mode 100644
(file)
new mode 100755
(executable)
index
402bb84
..
5ae9fe7
--- a/
scripts/restore-script.sh
+++ b/
scripts/restore-script.sh
@@
-1,17
+1,21
@@
#!/bin/sh
#!/bin/sh
+echo "Ran restore script with $@"
+
+exit 0
+
+export PATH=$rundir:/bin:/usr/bin
+
if [ $# != 1 ]; then
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
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
# 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
for date in $(cat $dbfile | list-dates.sh); do
eject $device