Browse Source

fixed grep echoing and footer file not showing

master
Alessandro Mauri 2 years ago
parent
commit
f943abbaeb
  1. 9
      rivet

9
rivet

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

Loading…
Cancel
Save