about summary refs log tree commit diff
path: root/sb_predictor.sh
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-03-01 19:48:47 -0500
committerZach DeCook <zachdecook@librem.one>2023-03-01 19:48:47 -0500
commitef36d5947bcc80f629a2b77cbd0931ea24a22d43 (patch)
tree548e1d7b67e77a7dbfee153a77cc0e4ccb701c38 /sb_predictor.sh
parent9a3212a2dea813581347efd58810bc16d371cda7 (diff)
downloadSwipeBehaviors-master.tar.gz
scripts: Fix posix compliance for sb_picker and some shellcheck sniffs HEAD master
Diffstat (limited to 'sb_predictor.sh')
-rwxr-xr-xsb_predictor.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/sb_predictor.sh b/sb_predictor.sh
index 1cae0dd..990badb 100755
--- a/sb_predictor.sh
+++ b/sb_predictor.sh
@@ -49,13 +49,13 @@ while read -r swipe; do
 			if test -e "$lw"; then
 				printf " " >> "$lw"
 				rm -f "$complete"
-				cat "$twow" | quick5 "$(cat "$lw")" >> "$sock"
+				quick5 "$(cat "$lw")" < "$twow" >> "$sock"
 				mv "$lw" "$tw"
 			fi
-		elif test "$swipe" = "$(echo -e "\x08")"; then
+		elif test "$swipe" = "$(printf "\b")"; then
 			lastword="$(cat "$lw" 2>/dev/null)"
 			printf %s "$lastword" | sed 's/.$//g' > "$lw"
-		elif test "$swipe" = "$(echo -e "\n")"; then
+		elif test "$swipe" = "$(printf "\n")"; then
 			rm -f "$lw" "$tw"
 		else
 			printf %s "$swipe" >> "$lw"