]> git.phdru.name Git - cookiecutter.git/blobdiff - mk-project
Refactor: Use `$#` to check parameters
[cookiecutter.git] / mk-project
index 18c1a1ccb0a53ec4daaf3d2e66be4d8558ccbde5..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
@@ -22,6 +22,7 @@ sphinx-quickstart --project="$project_name" --author="Oleg Broytman" \
    -v0.0 -r0.0.1 --ext-autodoc --makefile --no-batchfile -q docs &&
 
 git init &&
+echo "$project_name" >.git/description &&
 echo /publish-docs >>.git/info/exclude &&
 echo /update-remotes >>.git/info/exclude &&
 git add . &&