diff options
Diffstat (limited to 'git-shell-commands')
-rwxr-xr-x | git-shell-commands/delete-repo | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-shell-commands/delete-repo b/git-shell-commands/delete-repo index 17804c6..075f77a 100755 --- a/git-shell-commands/delete-repo +++ b/git-shell-commands/delete-repo @@ -6,8 +6,11 @@ set -e for repo in $@; do +# Remove leading slashes and dots and perform cleanup + repo="`echo "$repo" | sed -e "s,^[/\.]\+,,g" -e "s,[^a-z0-9\./_-],,gi"`" test ! -d "$repo".git && continue + echo "Removing ${repo}.git" # lo and behold absolute horror rm -rf "$repo".git done |