error checking to create gophermap properly if not created already

This commit is contained in:
James Tomasino 2018-07-11 23:29:41 -04:00
parent 28e1831369
commit d2543cccab
1 changed files with 5 additions and 1 deletions

6
burrow
View File

@ -307,10 +307,14 @@ make_post_gophermap () {
fi
fi
cat "$type_gophermap" >> "$temp_gophermap"
if [ -f "$type_gophermap" ]; then
cat "$type_gophermap" >> "$temp_gophermap"
fi
if ! $use_date; then
sort -fk 1.2 "$temp_gophermap" -o "$temp_gophermap"
fi
touch "$type_gophermap"
cat "$temp_gophermap" > "$type_gophermap"
rm "$temp_gophermap"