projects
/
cookiecutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c57fb8a
)
Refactor: Use `$#` to check parameters
master
author
Oleg Broytman
<phd@phdru.name>
Thu, 15 Aug 2019 18:54:59 +0000
(21:54 +0300)
committer
Oleg Broytman
<phd@phdru.name>
Thu, 15 Aug 2019 18:54:59 +0000
(21:54 +0300)
mk-project
patch
|
blob
|
history
move-project
patch
|
blob
|
history
diff --git
a/mk-project
b/mk-project
index 4674ef0c67d40ab65612eff12d08965bc813203a..eecfa53d03c23d52845f9a5fb7d49215c013ba7b 100755
(executable)
--- a/
mk-project
+++ b/
mk-project
@@
-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
diff --git
a/move-project
b/move-project
index 72f747570a02b446c9d0a5649a84a56167d8615d..2e7dba1029fc5cd7ee97e447d1a610145e024f47 100755
(executable)
--- a/
move-project
+++ b/
move-project
@@
-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