Refactor: Use `$#` to check parameters master
authorOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 18:54:59 +0000 (21:54 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 15 Aug 2019 18:54:59 +0000 (21:54 +0300)
mk-project
move-project

index 4674ef0..eecfa53 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-if [ -z "$1" -o -n "$2" ]; then
+if [ $# -ne 1 ]; then
    echo "Usage: $0 project_name" >&2
    exit 1
 fi
index 72f7475..2e7dba1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-if [ -z "$1" -o -n "$2" ]; then
+if [ $# -ne 1 ]; then
    echo "Usage: $0 project_name" >&2
    exit 1
 fi