]> git.armaanb.net Git - stagit.git/blobdiff - repo-gen.sh
Properly cut .git out of name.
[stagit.git] / repo-gen.sh
index 1b4659c65bc276fbfb1fad25ebc81c082ab0297a..1a22f85e1d4771d81cbb99e17f2b44696444369e 100755 (executable)
@@ -13,7 +13,7 @@ STAGIT_INDEX=/var/www/git/stagit-index.out
 [ ! -f "$STAGIT_INDEX" ] && STAGIT_INDEX=stagit-index
 
 for repo in /srv/git/*.git; do
-       repo="$(basename "$repo" | cut -f 1 -d '.')"
+       repo="$(basename "$repo" | rev | cut -c 5- | rev)"
 
        [ "$fresh" = true ] \
                && echo "Deleting HTML for $repo." \
@@ -27,7 +27,10 @@ for repo in /srv/git/*.git; do
 
        echo "git://git.knutsen.co/$repo" > "/srv/git/$repo.git/url"
 
-       "$STAGIT" "/srv/git/$repo.git"
+       COMMAND="$STAGIT /srv/git/$repo.git"
+       echo "$COMMAND"
+       $COMMAND
 done
 
+echo "Generating index.html with \`$STAGIT_INDEX\`."
 "$STAGIT_INDEX" /srv/git/*.git > /var/www/git/index.html