projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testing making changes.
[backups/.git]
/
scripts
/
restore-header.sh
diff --git
a/scripts/restore-header.sh
b/scripts/restore-header.sh
index a147c62e6a0b397dd704ecb533750342d05395a4..8374076c69134d8cf085f70f14ea56af919b1b05 100755
(executable)
--- a/
scripts/restore-header.sh
+++ b/
scripts/restore-header.sh
@@
-1,5
+1,7
@@
#!/bin/sh
#!/bin/sh
+
export rundir=/tmp/restore-$(date +%Y%m%d%H%M%S)
export rundir=/tmp/restore-$(date +%Y%m%d%H%M%S)
+
if ! mkdir $rundir; then
echo >&2 "Cannot create temp dir"
exit 1
if ! mkdir $rundir; then
echo >&2 "Cannot create temp dir"
exit 1
@@
-13,6
+15,7
@@
SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`
# take the archive portion of this file and pipe it to tar
tail +$SKIP $0 | tar xzf - -C $rundir
# take the archive portion of this file and pipe it to tar
tail +$SKIP $0 | tar xzf - -C $rundir
-exec $rundir/restore-script.sh ${1+"$@"}
+cd $rundir
+exec ./restore-script.sh ${1+"$@"}
__ARCHIVE_FOLLOWS__
__ARCHIVE_FOLLOWS__