commit a230bab14aff432bed6e3776e11ccf65c1f198e3
parent 8c1cf28e9f97f0247526185c8b2bd7285b52c137
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 27 Apr 2024 19:14:46 +0200
insert template using sed-readfile
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -25,9 +25,8 @@ find "${1}/${2}/${3}" -type f -name "*.html" -exec rm {} \;
stagit "${1}/${2}/${3}.git"
# insert highlighting template into all files that may show code
-TEMPLATE=`cat ${1}/templates/highlight.tt`
find "${1}/${2}${3}/file" -type f -name "*.html" \
- -exec sed -e "s/<\/body>/${TEMPLATE}<\/body>/g' -i {} \;
+ -exec sed "/<\/html>/r ${1}/templates/highlight.tt" -i {} \;
if [ -z $(find "${1}/${2}/${3}/file" -type f -name "README*.html") ]; then
# use log.html as index