about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2013-05-04 18:36:29 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2013-05-04 18:36:29 +0200
commitef2dbc3df8082782630f091833bd06206bdc3a07 (patch)
tree5fc2802d4a314d0f44902a6d718963808ad6f4ae
parent3d07f9650206b655516631e770bef479739d2eec (diff)
downloadrdumpfs-ef2dbc3df8082782630f091833bd06206bdc3a07.tar.gz
rdumpfs-ef2dbc3df8082782630f091833bd06206bdc3a07.tar.xz
rdumpfs-ef2dbc3df8082782630f091833bd06206bdc3a07.zip
detect too few arguments
-rwxr-xr-xrdumpfs3
1 files changed, 3 insertions, 0 deletions
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=${!#}