]> rtime.felk.cvut.cz Git - sojka/gl-perm.git/commitdiff
Complain if misused
authorMichal Sojka <sojka@os.inf.tu-dresden.de>
Tue, 20 Sep 2011 21:48:23 +0000 (23:48 +0200)
committerMichal Sojka <sojka@os.inf.tu-dresden.de>
Tue, 20 Sep 2011 21:48:23 +0000 (23:48 +0200)
gl-perm

diff --git a/gl-perm b/gl-perm
index 4c90add3b68b71f33837f52b4a5eab9f1bebc1b0..a9c522c135cc6f4cc6e3ddc6a5f32774ec39e858 100755 (executable)
--- a/gl-perm
+++ b/gl-perm
@@ -28,8 +28,10 @@ fi
 
 case $cmd in
     gl-getperms|get)
+       if test $# -gt 0; then echo >&2 "Command $cmd does not accept any arguments"; exit 1; fi
        ssh $userhost getperms $repo;;
     gl-setperms|set)
+       if test $# -gt 0; then echo >&2 "Command $cmd does not accept any arguments - it reads from stdin"; exit 1; fi
        ssh $userhost setperms $repo;;
     gl-addperm|add)
        perms=$(ssh $userhost getperms $repo)