Added support for 3rd argument = mount dir
[backups/.git] / scripts / restore-header.sh
index 8374076c69134d8cf085f70f14ea56af919b1b05..b05d19c38314e2c73adf6fe6dd00749c0f9bc427 100755 (executable)
@@ -8,7 +8,9 @@ if ! mkdir $rundir; then
 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`