summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-09-11 01:29:41 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-09-11 01:29:41 -0300
commit47d4a9eaa9f66aded2f0729d33b29d36e080ec05 (patch)
treef84330267c0875972570447a46374eb228e66a9f
parent2de9e49f22008c25fccfe79396e42e80b7c56cef (diff)
More fixups
-rwxr-xr-xgit-shell-commands/create-bare-repo8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo
index 1e06580..a6e49e3 100755
--- a/git-shell-commands/create-bare-repo
+++ b/git-shell-commands/create-bare-repo
@@ -5,13 +5,13 @@
set -e
-for i in $@; do
+for repo in $@; do
# Cleanup names
repo="`echo "$repo" | sed -e "s,^[/\.]\+,,g" -e "s,[^a-z0-9\./_-],,gi"`"
+ test ! -d "$repo".git && continue
- if [ -z "$repo" ]; then continue; fi
-
- mkdir "$repo".git
+ mkdir -p "$repo".git
pushd "$repo".git
git init --bare
+ popd
done