summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2019-02-05 22:49:56 -0600
committerepoch <epoch@hacking.allowed.org>2019-02-05 22:49:56 -0600
commit7f23fa80d9ad099be87da1622908c10f6d3d45c1 (patch)
tree528114f130763a7d6777dd22925aafeea0711611 /bin
parent549c3df0cbb295f2d8661a3cb7eeaf8e9f9a9a5b (diff)
downloadhackvr-7f23fa80d9ad099be87da1622908c10f6d3d45c1.tar.gz
hackvr-7f23fa80d9ad099be87da1622908c10f6d3d45c1.zip
changed makelabel.sh to use dirname dirname $0 instead of PREFIX variable to find where its fonts are probably installed
Diffstat (limited to 'bin')
-rwxr-xr-xbin/makelabel.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/makelabel.sh b/bin/makelabel.sh
index 4d02b47..24bb750 100755
--- a/bin/makelabel.sh
+++ b/bin/makelabel.sh
@@ -4,10 +4,7 @@ target="$1"
xoffset=$2
yoffset=$3
zoffset=$4
-if [ "_$PREFIX" = "_" ];then
- echo '$PREFIX' is not set. I use this to find where my font files are stored.
- exit 1
-fi
+dirdir0="$(dirname "$(dirname "$0")")"
if [ "_$1" = "_-h" -o "_$1" = "_--help" -o "_$1" = "_-help" ];then
echo $USAGE
exit 0 #we were asked for help and we succeeded with supplying help. :)
@@ -28,8 +25,8 @@ while read -rN 1 c;do
xoffset=-6
yoffset="$(printf '%d - %d\n' $yoffset 10 | bc)"
fi
- if grep "^$name " ${PREFIX}/share/hackvr/font/default.hackvr 2>&1 > /dev/null;then #don't do this shit unless we actually have something to draw. awk in offsetshape bitches when there's nothing.
- grep "^$name " ${PREFIX}/share/hackvr/font/default.hackvr \
+ if grep "^$name " "${dirdir0}/share/hackvr/font/default.hackvr" 2>&1 > /dev/null;then #don't do this shit unless we actually have something to draw. awk in offsetshape bitches when there's nothing.
+ grep "^$name " "${dirdir0}/share/hackvr/font/default.hackvr" \
| sed 's/^'"$name"'/'"$target"'/' \
| offsetshape.sh "$xoffset" "$yoffset" "$zoffset"
fi