From d2543cccab82c376bdc5c53a28b97ac1d97e38d7 Mon Sep 17 00:00:00 2001 From: James Tomasino Date: Wed, 11 Jul 2018 23:29:41 -0400 Subject: [PATCH] error checking to create gophermap properly if not created already --- burrow | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/burrow b/burrow index 27f15ba..73e1bac 100755 --- a/burrow +++ b/burrow @@ -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"