fixed grep echoing and footer file not showing

pull/1/head
Alessandro Mauri 4 years ago
parent 46a09ad7e7
commit f943abbaeb
  1. 9
      rivet

@ -112,10 +112,15 @@ if ! [ "$SKIP_HEADER" ]; then
fi fi
# Prepate the footer # Prepate the footer
if ! [ "$SKIP_FOOTER" ]; then if ! [ "$SKIP_FOOTER" ]; then
tmpfoot="tmpfootfile.tmp"
cp "$footerfile" "$tmpfoot"
sed -i '1s/^/<footer>/' "$tmpfoot"
echo '</footer>' >> "$tmpfoot"
find "$destdir" -name "*.html" | find "$destdir" -name "*.html" |
while IFS="" read -r file; do while IFS="" read -r file; do
sed -i "/<footer>/r $footerfile" "$file" sed -i "/<\/body>/r $tmpfoot" "$file"
done done
rm -f "$tmpfoot"
fi fi
# Prepare the sitemap & file list # Prepare the sitemap & file list
@ -136,7 +141,7 @@ if ! [ "$SKIP_SITEMAP" ] || ! [ "$SKIP_LIST" ]; then
<h2 id="Pages">Pages</h2> <h2 id="Pages">Pages</h2>
EOF EOF
while IFS="" read -r line; do while IFS="" read -r line; do
if echo "$line" | grep 'index\.html'; then if echo "$line" | grep -q 'index\.html'; then
continue continue
fi fi
title="$(grep -e '^<title>.*<\/title>' "$destdir"/"$line" | title="$(grep -e '^<title>.*<\/title>' "$destdir"/"$line" |

Loading…
Cancel
Save