Regular commit
[backups/.git] / scripts / rsync-cmd.sh
index 2ee3682403c74f4894a8a09e6b78a9a77e98824b..aa7e9f78562e3794f29235416aa23ff2473617c6 100755 (executable)
@@ -3,22 +3,13 @@
 # This file just has some ideas about how to do the rsync command with the list
 # of file produced by lsbackups
 
+[ $# == 1 ] || exit 1
+[ -d $1   ] || exit 1
+
 # -H ? -W ?
 rsync_opts='-W -H -l -p -t -g -o -0 --files-from=-'
 
 other_opts='--stats --progress'
 
-# This would something like be /home
-srcdir=~/test/a
-
-# This would be something like /mnt/dvdisoimage
-dstdir=~/destdir
-
-# # For directories  ( Do I even need this?  I don't think so. )
-# find $srcdir -type d -print0 | # this just produces an example null-delimited list.
-#   rsync -d $rsync_opts $other_opts / $dstdir
-
 # Should also include directories in there
-find $srcdir \( -type f -o -type l -o -type d \) -print0 | # this just produces an example null-delimited list.
-  rsync $rsync_opts $other_opts / $dstdir
-
+rsync $rsync_opts $other_opts / $1