From 825282fea9102326ad2538e4a98329fbd38c899b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 29 Jun 2021 08:30:52 -0400 Subject: firststuffs --- barsup | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 barsup (limited to 'barsup') diff --git a/barsup b/barsup new file mode 100755 index 0000000..71d21d4 --- /dev/null +++ b/barsup @@ -0,0 +1,18 @@ +#!/bin/sh + +# Replace existing navs and footers with content of nav and footer files. + +navfile="/home/luke/.local/src/landchad/.nav.html" +footerfile="/home/luke/.local/src/landchad/.footer.html" + +files="$(for x in $(find /home/luke/.local/src/landchad -type f -iname '*.html'); do + echo "$x" +done)" + +escnav="$(sed "s|^\s\+||;s|/|\\\\/|g;s|\"|\\\\\"|g" "$navfile" 2>/dev/null | tr -d '\n')" +escfooter="$(sed "s|^\s\+||;s|/|\\\\/|g;s|\"|\\\\\"|g" "$footerfile" 2>/dev/null | tr -d '\n')" + +sed -s -i "s/