From ef2dbc3df8082782630f091833bd06206bdc3a07 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 4 May 2013 18:36:29 +0200 Subject: detect too few arguments --- rdumpfs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rdumpfs b/rdumpfs index 98ccbf5..3acc606 100755 --- a/rdumpfs +++ b/rdumpfs @@ -18,6 +18,9 @@ fail() { force=false [[ "$1" = -f ]] && force=true && shift +(( $# < 2 )) && fail "too few arguments +Usage: rdumpfs [-f] [RSYNCOPT...] SRC [SRC...] DST" + src=("${@:1:$#-1}") dst=${!#} -- cgit 1.4.1