From 6bd358282ae7b63b3bf5f75da6c922e638fefbcd Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 29 Jul 2014 21:30:39 +0100 Subject: Move the --dry-run handling into the functions file. --- functions | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'functions') diff --git a/functions b/functions index 992157f..26fc6db 100644 --- a/functions +++ b/functions @@ -16,6 +16,13 @@ mirror_rsync_options="--dry-run -v --delete -alH" [ -f /etc/mgatools.conf ] && . /etc/mgatools.conf +# Generic support for --dry-run as first argument +if [ "$1" = "--dry-run" ]; then + dryrun=echo + mirror_rsync_options="--dry-run -v --delete -alH" + shift +fi + function isingroup() { grp="$1" -- cgit v1.2.1