summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2018-03-29 17:53:17 -0500
committerepoch <epoch@hacking.allowed.org>2018-03-29 17:53:17 -0500
commitfb08435f0d450fc2b65d68f066ac52b33fff32c8 (patch)
treeef8d7991deb136d83a88b9a0b4d45da601710481
parent67dedb98f82b7ba2c78afd49e81a0650dab796a9 (diff)
downloadhackvr-fb08435f0d450fc2b65d68f066ac52b33fff32c8.tar.gz
hackvr-fb08435f0d450fc2b65d68f066ac52b33fff32c8.zip
gopher backend for browser scripts now exits cleaning if hackvr exits by checking for empty input
-rwxr-xr-xfilebrowser/backend-gopher.sh4
1 files changed, 4 insertions, 0 deletions
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