projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new remote server option. Added "force" behavior to take a disk not matching...
[backups/.git]
/
scripts
/
restore-header.sh
diff --git
a/scripts/restore-header.sh
b/scripts/restore-header.sh
index 2c17e854c33f2fdedbe6456d3102b1faa35a9eb4..b05d19c38314e2c73adf6fe6dd00749c0f9bc427 100755
(executable)
--- a/
scripts/restore-header.sh
+++ b/
scripts/restore-header.sh
@@
-1,12
+1,16
@@
#!/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
fi
unset CDPATH
if ! mkdir $rundir; then
echo >&2 "Cannot create temp dir"
exit 1
fi
unset CDPATH
-export mountdir=$(cd $(dirname $0) && pwd)
+if [ -z "$3" ]; then
+ export mountdir=$(cd $(dirname $0) && pwd -P)
+fi
SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`
SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`