Return to repo list

remgit-scripts

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

commit d0e6e7e5397f7e0d60c707b8dc0aac895730dfd3
parent 0b7511f95af75757b089f0b41d7d4b604167c5a0
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Sun,  5 Jul 2020 20:58:04 -0500

regularize sed syntax

Diffstat:
Mupstagit.sh | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/upstagit.sh b/upstagit.sh @@ -41,18 +41,18 @@ cd $WEB_PATH $STAGIT_INDEX_COM $REPO_PATH/* > $WEB_PATH/index.html # Update paths to stylesheets and logos in all web pages -sed -i 's,class\=\"desc\">Repositories,class\=\"desc\"><h1>Repositories<\/h1>,g' "$WEB_PATH/index.html" -sed -i 's,<td><b>Owner<\/b><\/td>,<td><\/td>,g' "$WEB_PATH/index.html" +sed -i "s,class\=\"desc\">Repositories,class\=\"desc\"><h1>Repositories<\/h1>,g" "$WEB_PATH/index.html" +sed -i "s,<td><b>Owner<\/b><\/td>,<td><\/td>,g" "$WEB_PATH/index.html" sed -i "s,<td><a href\=\",<td><a href=\"$WEB_REPO_DIR\/,g" "$WEB_PATH/index.html" -sed -i -E -e "s,src\=\".*logo\.png\",src\=\"$LOGO_URL\",g" "$WEB_PATH/index.html" -sed -i -E -e "s,href\=\".*style\.css\",href\=\"$STYLE_URL\",g" "$WEB_PATH/index.html" +sed -i "s,src\=\".*logo\.png\",src\=\"$LOGO_URL\",g" "$WEB_PATH/index.html" +sed -i "s,href\=\".*style\.css\",href\=\"$STYLE_URL\",g" "$WEB_PATH/index.html" sed -i "s,width\=\"32\" height\=\"32\",width\=\"$ICON_WIDTH\" height\=\"$ICON_HEIGHT\",g" "$WEB_PATH/index.html" 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 - sed -i -E -e "s,css\" href\=\".*style\.css\",css\" href\=\"$STYLE_URL\"," "$k" + 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" done