]> git.phdru.name Git - cookiecutter.git/commitdiff
Refactor: Use `$#` to check parameters
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 4674ef0c67d40ab65612eff12d08965bc813203a..eecfa53d03c23d52845f9a5fb7d49215c013ba7b 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 72f747570a02b446c9d0a5649a84a56167d8615d..2e7dba1029fc5cd7ee97e447d1a610145e024f47 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