]> git.armaanb.net Git - stagit.git/blobdiff - repo-gen.sh
More verbose repo-gen.sh
[stagit.git] / repo-gen.sh
index ad685927a093d6f5d2eb2fccea5fc1ed7aca64b9..c68950c4aa16234f09bd98d016c3afc28614959b 100755 (executable)
@@ -6,22 +6,31 @@ for arg in "$@"; do
        [ "$arg" = "--fresh" ] && fresh=true
 done
 
+STAGIT=/var/www/git/stagit.out
+[ ! -f "$STAGIT" ] && STAGIT=stagit
+
+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 '.')"
-       
+
        [ "$fresh" = true ] \
                && echo "Deleting HTML for $repo." \
                && rm -fr "/var/www/git/$repo"
        mkdir -p "/var/www/git/$repo"
        cd "/var/www/git/$repo"
-       
+
        [ ! -f style.css ]   && ln -s ../style.css ./
        [ ! -f favicon.png ] && ln -s ../favicon.png ./
        [ ! -f logo.png ]    && ln -s ../logo.png ./
 
        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
 
-stagit-index /srv/git/*.git > /var/www/git/index.html
+echo "Generating index.html with \`$STAGIT_INDEX\`."
+"$STAGIT_INDEX" /srv/git/*.git > /var/www/git/index.html