From 375cfed5ce6c17cc9141d192a877bb20655d59b6 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 9 Aug 2020 14:31:38 -0700 Subject: [PATCH] install.sh: install git-browser with shortcut icon links Signed-off-by: Kyle J. McKay --- install.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 2569bd0..191af07 100755 --- a/install.sh +++ b/install.sh @@ -864,11 +864,22 @@ mkdir -p "$webroot"/git-browser "$cgiroot" chown_make "$cgiroot"/git-diff.cgi.$$ && mv -f "$cgiroot"/git-browser.cgi.$$ "$cgiroot"/git-browser.cgi && mv -f "$cgiroot"/git-diff.cgi.$$ "$cgiroot"/git-diff.cgi && - cp -r *.html *.js *.css js.lib "$webroot"/git-browser && - cp -r JSON "$cgiroot" + for h in *.html; do + [ "$h" != "index.html" ] || continue + if [ "$h" = "by-commit.html" ] || [ "$h" = "by-date.html" ]; then + FAVLINE='' && + export FAVLINE && perl -p -e 'print "$ENV{FAVLINE}\n" if m{};' "$h" \ + >"$webroot/git-browser/$h.$$" && + chmod a+r "$webroot/git-browser/$h.$$" && + mv -f "$webroot/git-browser/$h.$$" "$webroot/git-browser/$h" + else + cp -p "$h" "$webroot/git-browser/" + fi + done + cp -pR *.js *.css js.lib "$webroot/git-browser/" && + cp -pR JSON "$cgiroot/" ) test $? -eq 0 -rm -f "$webroot"/git-browser/index.html gitwebabs="$cfg_gitweburl" case "$gitwebabs" in "http://"[!/]*|"https://"[!/]*) gitwebabs="${gitwebabs#*://}" -- 2.11.4.GIT