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 /git-shell-commands/create-bare-repo | |
parent | 3ce233785c903b62b7f2e7eb64a71a0ba81a33fc (diff) |
Exit on error
Diffstat (limited to 'git-shell-commands/create-bare-repo')
-rwxr-xr-x | git-shell-commands/create-bare-repo | 10 |
1 files changed, 5 insertions, 5 deletions
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 |