Return to repo list

remgit-scripts

A collection of scripts for use with a simple remote git service.
Return to HMagellan.com

commit 4f2319be9d39817d31b730c3f2cd410203e31d93
parent 2c20972607bc08de9570c1ca0a344d4b5cbe6cb4
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Mon,  6 Jul 2020 12:15:48 -0500

Overhaul of html file sed-thru

Diffstat:
Mupstagit.sh | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/upstagit.sh b/upstagit.sh @@ -50,7 +50,8 @@ sed -i "s,<table>,<table id\=\"title-head\">," "$WEB_PATH/index.html" sed -i "s,<\/span><\/td><\/tr>,<\/span><\/td><td><a href\=\"$HOME_PAGE_URL\">$HOME_LINK_TEXT<\/a><\/td><\/tr>," "$WEB_PATH/index.html" for j in $(ls $REPO_PATH); do - for k in $(ls -R -a1 $WEB_PATH/$WEB_REPO_DIR/* | find $WEB_PATH/$WEB_REPO_DIR | grep ".html$"); do + jdir=$(sed 's,\.git$,,' <<< $j) + for k in $(find $WEB_PATH/$WEB_REPO_DIR/$jdir | grep ".html$"); do sed -i "s,css\" href\=\".*style\.css\",css\" href\=\"$STYLE_URL\"," "$k" sed -i "s,<table>.*<img.*\/>,<table id\=\"title-head\"><tr><td><a href\=\"$WEB_URL\"><img src\=\"$LOGO_URL\" alt\=\"$LOGO_ALT\" width\=\"$ICON_WIDTH\" height\=\"$ICON_HEIGHT\" \/> ," "$k" sed -i "s,<\/a><\/td><\/tr><\/table>,<\/a> \| git clone: <a href\=\"$GIT_ACCESS_URL\/$j\">$GIT_ACCESS_URL\/$j<\/a><\/td><\/tr><\/table>," "$k"