summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/hackvr_uri2
-rwxr-xr-xbin/makelabel.sh2
-rwxr-xr-xshare/hackvr/examples/draw/run2
-rwxr-xr-xshare/hackvr/examples/tictactoe/run2
4 files changed, 4 insertions, 4 deletions
diff --git a/bin/hackvr_uri b/bin/hackvr_uri
index d4e3b3a..7907d9b 100755
--- a/bin/hackvr_uri
+++ b/bin/hackvr_uri
@@ -4,4 +4,4 @@ hackvr \
| tee \
>(sed -un "s/$USER *action *<\([^ ]*\)>/\1/p" \
| stdbuf -o0 tr '\n' '\0' \
- | xargs -n1 -P 0 -0 copy_start_nevermind.sh 2>&1 >/dev/null)
+ | xargs -n1 -r -P 0 -0 copy_start_nevermind.sh 2>&1 >/dev/null)
diff --git a/bin/makelabel.sh b/bin/makelabel.sh
index 1f8a68a..90f908a 100755
--- a/bin/makelabel.sh
+++ b/bin/makelabel.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
USAGE="usage: makelabel.sh labelname x y z < labelcontent"
-target="$1"
+target="$(printf "%s\n" "$1" | sed 's|\([/\&]\)|\\\1|g')"
xoffset=$2
yoffset=$3
zoffset=$4
diff --git a/share/hackvr/examples/draw/run b/share/hackvr/examples/draw/run
index f14b415..699a38c 100755
--- a/share/hackvr/examples/draw/run
+++ b/share/hackvr/examples/draw/run
@@ -1,3 +1,3 @@
#!/bin/sh
mknod p p
-cat p | tee /dev/stderr | ./draw.sh | hackvr $USER > p
+hackvr_coproc ./draw.sh
diff --git a/share/hackvr/examples/tictactoe/run b/share/hackvr/examples/tictactoe/run
index 46a5b44..bf9c87a 100755
--- a/share/hackvr/examples/tictactoe/run
+++ b/share/hackvr/examples/tictactoe/run
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
turn=$( expr $RANDOM % 2)
echo "go. player: $turn"
-socat exec:./game.sh exec:hackvr
+hackvr_coproc ./game.sh