Added info to top of site-map page, and fixed bug with 'temp' directory name

master
Aadhavan Srinivasan 7 months ago
parent 54dda40de4
commit e0c79984b2

@ -161,7 +161,7 @@ convert_file() {
# one that doesn't exist in the 'temp' directory. This string
# will serve as the parent directory of our file.
parent_dir="$(tr -dc A-Za-z </dev/urandom | head -c 8; echo)"
while ls -r temp | grep -q "$parent_dir" ; do
while ls -r "$BASE_PATH"/temp | grep -q "$parent_dir" ; do
parent_dir="$(tr -dc A-Za-z </dev/urandom | head -c 8; echo)"
done
@ -237,7 +237,8 @@ gen_index_page() { # Generate an index page (site map) that includes links to th
echo "Generating index page..."
local index_file_html="<nav class=\"toc\">"$'\n' # Variable to store the body HTML of the index page; enclose the list in a nav
local index_file_html="<nav class=\"toc\">"$'\n' # Variable to store the body HTML of the index page, enclose the list in a nav
index_file_html+="<p>(All dates are in MM/DD/YYYY format)</p>"$'\n'
for file in $1; do
local title=$(cat "$file" | grep "<title>" | head -n 1 | awk -F'[<>]' '{print $3}') # Find the title of the web page

Loading…
Cancel
Save