From fb08435f0d450fc2b65d68f066ac52b33fff32c8 Mon Sep 17 00:00:00 2001 From: epoch Date: Thu, 29 Mar 2018 17:53:17 -0500 Subject: gopher backend for browser scripts now exits cleaning if hackvr exits by checking for empty input --- filebrowser/backend-gopher.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'filebrowser') diff --git a/filebrowser/backend-gopher.sh b/filebrowser/backend-gopher.sh index 54b39c5..e606667 100755 --- a/filebrowser/backend-gopher.sh +++ b/filebrowser/backend-gopher.sh @@ -11,5 +11,9 @@ while true;do printf '%s\n' "$selection" | ncat "$server" "$port" | tee /dev/stderr | grep -v ^i | cut -f2 | tr -d '\r' ### need to ask user for input in the form of a pop-up window if the selected target was of type 7 read -r selection + if [ "_" = "_$selection" ];then + echo "looks like there's nothing here. exiting." >&2 + exit 1 + fi echo done -- cgit v1.2.3