diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-08 20:00:33 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-08 20:00:33 -0300 |
commit | c562e291c0adca7cb7dd2e1ce5ac26e1cd405603 (patch) | |
tree | 7e4c375d702a6ac2bf3f702631cb0b69efe57ac4 | |
parent | 3ce233785c903b62b7f2e7eb64a71a0ba81a33fc (diff) |
Exit on error
-rwxr-xr-x | git-shell-commands/change-description | 2 | ||||
-rwxr-xr-x | git-shell-commands/create-bare-repo | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index 120b1cd..d29eaa8 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -2,7 +2,7 @@ # Allows users to change project description # $ ssh git@host change-description repo "description" -set -E +set -e repo=$1; shift diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo index 14a640b..b0174e2 100755 --- a/git-shell-commands/create-bare-repo +++ b/git-shell-commands/create-bare-repo @@ -2,15 +2,15 @@ # Allows users to create repo.git # $ ssh git@host create-bare-repo repo1 repo2 ... -set -E +set -e for i in $@; do # Cleanup names - i="`echo "$i" | sed "s/[^a-z0-9\.\-\_]//gi"`" + repo="`echo "$i" | sed "s/[^a-z0-9\.\-\_]//gi"`" - if [ -z "$i" ]; then continue; fi + if [ -z "$repo" ]; then continue; fi - mkdir "$i".git - pushd "$i".git + mkdir "$repo".git + pushd "$repo".git git init --bare done |