repo: veilid-hacks action: blob revision: path_from: veilid-getstate revision_from: refs/heads/trunk: path_to: revision_to:
blob of:
/ veilid-getstate
refs/heads/trunk:/veilid-getstate
#!/usr/bin/env bash
if [ "$1" = "-h" -o "$1" = "--help" ];then
printf 'usage: veilid-now\n' >&2
exit 1
fi
if [ "$1" != "socat" ];then
exec socat tcp:"${VEILID_SERVER:-127.0.0.1:5959}" exec:"$0 socat" 2>&1
else
shift
fi
printf '{"op":"GetState"}\n'
state=0
stdbuf -oL jq -nc 'inputs | select(.type != "Update")' | while read -r line;do
jq -r .value <<< "$line" >&2
printf '\nQUIT :what? this isnt woodshop?\r\n'
done