Skip to content

Commit

Permalink
Fix script compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
R-JG committed Jul 17, 2024
1 parent a06f1c1 commit 085f377
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions desk/app/homunculus-script.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@
event_id="${line:4}"
elif [[ "${line:0:6}" = "data: " ]] && grep -q "json" <<< "$line"; then
dat=$(echo "${line:6}" | jq -r '.json')
echo -e -n "$dat"
dat=${dat//%/%%}
printf "$dat"
ack $event_id
fi
done
Expand Down Expand Up @@ -181,7 +182,7 @@
PS1=
stty -echo
echo -e "\e[?1000;1006;1015h"
printf "\e[?1000;1006;1015h"
start_connection
Expand All @@ -193,7 +194,7 @@
clear
stty echo
echo -e "\e[?1000;1006;1015l"
printf "\e[?1000;1006;1015l"
'''
::
++ on-watch
Expand Down
7 changes: 4 additions & 3 deletions homunculus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ stream() {
event_id="${line:4}"
elif [[ "${line:0:6}" = "data: " ]] && grep -q "json" <<< "$line"; then
dat=$(echo "${line:6}" | jq -r '.json')
echo -e -n "$dat"
dat=${dat//%/%%}
printf "$dat"
ack $event_id
fi
done
Expand Down Expand Up @@ -126,7 +127,7 @@ send_size() {

PS1=
stty -echo
echo -e "\e[?1000;1006;1015h"
printf "\e[?1000;1006;1015h"

start_connection

Expand All @@ -138,4 +139,4 @@ read_input

clear
stty echo
echo -e "\e[?1000;1006;1015l"
printf "\e[?1000;1006;1015l"

0 comments on commit 085f377

Please sign in to comment.