X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=rsync-luks.sh;h=7f0a5e0a8cb4b4ee76ec08d32e6b3800a15ae823;hp=87daf192cbae0327cb000e4c4f005c3c6cecd9ed;hb=HEAD;hpb=71bcbb9518bc6512f6ff22c0aa8fc04b2e921a52
diff --git a/rsync-luks.sh b/rsync-luks.sh
index 87daf19..7f0a5e0 100755
--- a/rsync-luks.sh
+++ b/rsync-luks.sh
@@ -14,24 +14,19 @@
# along with this program. If not, see . #
# #
# Written by and Copyright (C) Francois Fleuret #
-# Contact for comments & bug reports #
+# Contact for comments & bug reports #
#########################################################################
-# This script takes two filenames as arguments, mounts them as luks
-# volumes, and synchronizes their contents.
-
-# IT CHANGES THE CONTENT OF THE SECOND ARGUMENT
-
set -e
set -o pipefail
-if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
+if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
cat <
-Mounts both files as LUKS volume and rsync the source to the dest. It
-first performs a dry-run and then asks for interactive confirmation
-before synchronizing for real.
+Mounts both files as LUKS volumes and rsyncs the source to the
+dest. It first performs a dry-run and then asks for interactive
+confirmation before synchronizing for real.
Comments and bug reports to francois@fleuret.org
@@ -39,21 +34,21 @@ EOF
exit 0
fi
-[ -f "$1" ] && [ -f "$2" ] || (echo "$0