summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-02-12 19:10:39 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-02-12 19:10:39 +0100
commite2d12f60436035288b22bba4f97e5f010696f9c0 (patch)
tree2d5ca39142c82ea57a29b8b20e45e82658037ab5
parent684970a52534caea0f26e0ffa2b63f03557cf745 (diff)
fix: path when checking if git repo exists
-rwxr-xr-xbin/stagit-new-repo2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/stagit-new-repo b/bin/stagit-new-repo
index e7cba72..90b0882 100755
--- a/bin/stagit-new-repo
+++ b/bin/stagit-new-repo
@@ -15,7 +15,7 @@ home="/home/git"
srv="/srv/git"
www="/var/www/git"
-[ -d "$srv/$repo" ] && echo "$repo already exists!" && exit 1
+[ -d "$srv/$repo.git" ] && echo "$repo already exists!" && exit 1
git init --bare "$srv/$repo.git"
cp "/usr/local/share/post-receive" "$srv/$repo.git/hooks/post-receive"