more bugfixes

typo
Alessandro Mauri 4 years ago
parent b7a25b796a
commit e0367536ea
  1. 9
      rivet.sh

@ -65,6 +65,8 @@ fi
src="$1" src="$1"
srcdir=${src%%\/} srcdir=${src%%\/}
unset src unset src
headerfile=$srcdir/_header.html
footerfile=$srcdir/_footer.html
# Check if index.md is present # Check if index.md is present
if ! [ -e "$srcdir"/index.md ]; then if ! [ -e "$srcdir"/index.md ]; then
@ -93,9 +95,6 @@ url="$(echo "$2" |
sed -e 's/\/$//' | sed -e 's/\/$//' |
sed -e 's/[]\/$*.^[]/\\&/g')" sed -e 's/[]\/$*.^[]/\\&/g')"
headerfile=$srcdir/_header.html
footerfile=$srcdir/_footer.html
if [ "$PRINT_HELP" ]; then if [ "$PRINT_HELP" ]; then
usage usage
fi fi
@ -153,7 +152,7 @@ if ! [ "$SKIP_SITEMAP" ] || ! [ "$SKIP_LIST" ]; then
rm -f "$tmpfile" rm -f "$tmpfile"
cat << EOF >> "$tmpfile" cat << EOF >> "$tmpfile"
<div id="map"> <div id="map">
<h2 id="Pages">"$linksec"</h2> <h2 id="Pages">$linksec</h2>
EOF EOF
while IFS="" read -r line; do while IFS="" read -r line; do
if echo "$line" | grep -q 'index\.html'; then if echo "$line" | grep -q 'index\.html'; then
@ -161,7 +160,7 @@ EOF
fi fi
title="$(grep -e '^<title>.*<\/title>' "$destdir"/"$line" | title="$(grep -e '^<title>.*<\/title>' "$destdir"/"$line" |
sed -e 's/<title>//' -e 's/<\/title>//')" sed -e 's/<title>//' -e 's/<\/title>//')"
if ! [ "$title" ]; then if ! [ "$title" ] || echo "$title" | grep -q 'Untitled article'; then
title=${line%?????} title=${line%?????}
fi fi
printf "<p><a href=\"%s\">%s</a></p>\n" "$line" "$title" >> "$tmpfile" printf "<p><a href=\"%s\">%s</a></p>\n" "$line" "$title" >> "$tmpfile"

Loading…
Cancel
Save