diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-09-11 01:29:41 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-09-11 01:29:41 -0300 |
commit | 47d4a9eaa9f66aded2f0729d33b29d36e080ec05 (patch) | |
tree | f84330267c0875972570447a46374eb228e66a9f /git-shell-commands | |
parent | 2de9e49f22008c25fccfe79396e42e80b7c56cef (diff) |
More fixups
Diffstat (limited to 'git-shell-commands')
-rwxr-xr-x | git-shell-commands/create-bare-repo | 8 |
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 |