summaryrefslogtreecommitdiff
path: root/bin/hackvr_uri
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-04-18 02:38:17 -0500
committerepoch <epoch@thebackupbox.net>2020-04-18 02:38:17 -0500
commite7019fb09653472bb57474638188dcba337f1a3c (patch)
treec0b1fb12c41cdaac57859929188a3476b7ad87d0 /bin/hackvr_uri
parent9f5c79eff1a3fae473bbdd12afcb77875d8548af (diff)
downloadhackvr-e7019fb09653472bb57474638188dcba337f1a3c.tar.gz
hackvr-e7019fb09653472bb57474638188dcba337f1a3c.zip
made the tee in hackvr_uri exit on a write error so that if you exit hackvr it'll stop the script
Diffstat (limited to 'bin/hackvr_uri')
-rwxr-xr-xbin/hackvr_uri4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/hackvr_uri b/bin/hackvr_uri
index 7907d9b..19c0f37 100755
--- a/bin/hackvr_uri
+++ b/bin/hackvr_uri
@@ -1,6 +1,8 @@
#!/bin/bash
#this is a version of hackvr that will attempt to launch URIs that your user actions on.
-hackvr \
+set -o pipefail
+tee --output-error=exit /dev/stderr | hackvr \
+ | grep --line-buffered -v '^#' \
| tee \
>(sed -un "s/$USER *action *<\([^ ]*\)>/\1/p" \
| stdbuf -o0 tr '\n' '\0' \