3 export rundir=/tmp/restore-$(date +%Y%m%d%H%M%S)
5 if ! mkdir $rundir; then
6 echo >&2 "Cannot create temp dir"
12 export mountdir=$(cd $(dirname $0) && pwd -P)
15 SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`
17 # take the archive portion of this file and pipe it to tar
18 tail +$SKIP $0 | tar xzf - -C $rundir
21 exec ./restore-script.sh ${1+"$@"}