summaryrefslogtreecommitdiff
path: root/git-shell-commands/create-bare-repo
diff options
context:
space:
mode:
Diffstat (limited to 'git-shell-commands/create-bare-repo')
-rwxr-xr-xgit-shell-commands/create-bare-repo10
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