From 47d4a9eaa9f66aded2f0729d33b29d36e080ec05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 11 Sep 2013 01:29:41 -0300 Subject: More fixups --- git-shell-commands/create-bare-repo | 8 ++++---- 1 file 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 -- cgit v1.1-4-g5e80