summaryrefslogtreecommitdiff
path: root/makelabel.sh
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-11-19 01:48:42 -0600
committerepoch <epoch@hacking.allowed.org>2017-11-19 01:48:42 -0600
commiteee6279b3737e2037b5b6bfb84ca83fd8bbc6359 (patch)
tree9c351df39d9fa706fe55fe728501cf4598b8da4a /makelabel.sh
parent1a1ee6d4e2bbbd5a4f91126afeb5c43ed9e6139f (diff)
downloadhackvr-eee6279b3737e2037b5b6bfb84ca83fd8bbc6359.tar.gz
hackvr-eee6279b3737e2037b5b6bfb84ca83fd8bbc6359.zip
some utilities for manipulating objects outside of hackvr
Diffstat (limited to 'makelabel.sh')
-rwxr-xr-xmakelabel.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/makelabel.sh b/makelabel.sh
new file mode 100755
index 0000000..123f3a4
--- /dev/null
+++ b/makelabel.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+target="$1"
+xoffset=$2
+yoffset=$3
+zoffset=$4
+while read -N 1 c;do
+ name="$(printf "%02x" "'$c")"
+ if [ "$name" = "0a" ]; then
+ xoffset=-6
+ yoffset="$(printf '%d - %d\n' $yoffset 10 | bc)"
+ fi
+ grep "^$name " font/font.hackvr | sed 's ^'"$name"' '"$target"' ' | ./tools/offsetshape.sh "$xoffset" "$yoffset" "$zoffset"
+ xoffset="$(printf '%d + %d\n' $xoffset 6 | bc)"
+done