From 93e1c41e9ca72a3e5e93aad4d2d2ab64ad5cdad9 Mon Sep 17 00:00:00 2001 From: James Tomasino Date: Tue, 1 May 2018 22:23:48 -0400 Subject: [PATCH] rss feed builds relative links if server and port suppressed --- burrow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/burrow b/burrow index 5fcff0a..f38facc 100755 --- a/burrow +++ b/burrow @@ -488,7 +488,7 @@ make_rss () { printf " \\n" if printf "%s" "$filename" | grep -q "gophermap$" then - awk -F"\\t" '/^[2-9\+GITs].*\t/ {print $0; next} /^h.*\t/ { l=substr($1, 2, length($1)); print l "\n " substr($2, 5, length($2)); next } /^[0-1].*\t/ { l=substr($1, 2, length($1)); t=substr($1,1,1); print l "\n gopher://" $3 "/" t $2; next } {sub(/^i/, "", $1);print $1}' "$f" + awk -v server="${config_gopher_server}" -v port="${config_gopher_port}" -F"\\t" '/^[2-9\+GITs].*\t/ {print $0; next} /^h.*\t/ { l=substr($1, 2, length($1)); print l "\n " substr($2, 5, length($2)); next } /^[0-1].*\t/ { l=substr($1, 2, length($1)); t=substr($1,1,1); (!$3) ? s=server : s=$3; print l "\n gopher://" s "/" t $2; next } {sub(/^i/, "", $1);print $1}' "$f" else cat "$f" fi