be there. Also, be strict about sourcedir being an actual directory.
export PATH=${rundir%%/}:/bin:/usr/bin:/sbin:/usr/sbin:/sw/bin
-if [ ! -d "$mountdir$1" -o ! -d "$2" ]; then
+if [ ! -z "$1" -o ! -d "$2" ]; then
err "
Usage: $0 <source-dir> <relocate-dir> [<mnt-dir>]
source-dir - directory on backup disks to restore from (relative to $mountdir)
done
rsyncopts="-W -H -S -l -p -t -g -o -0 --files-from=- --stats --progress"
- cat $dbfile | files-from-date.sh $date | grep -z -Z -e "^${1}" | rsync $rsyncopts ${mountdir%%/}/ ${2%%/}/
+ cat $dbfile | files-from-date.sh $date | grep -z -Z -e "^${1%/}/" | rsync $rsyncopts ${mountdir%%/}/ ${2%%/}/
done