xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/root/bin/a-text

8 lines
270 B
Plaintext
Raw Normal View History

2024-11-19 16:17:06 +01:00
#!/bin/sh
test -n "$1" || { echo "usage: a-text <textfile_or_string>"; exit; }
str="$1"
test -f "$str" && str="$(cat "$1" | sed ':a;N;$!ba;s/\n/\\n/g' )" # escape linebreaks
echo "<a-text value='${str}' position='-0.4 1.8 -3' grabbable></a-text>" >> /root/index.html