From 7f23fa80d9ad099be87da1622908c10f6d3d45c1 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 5 Feb 2019 22:49:56 -0600 Subject: changed makelabel.sh to use dirname dirname $0 instead of PREFIX variable to find where its fonts are probably installed --- bin/makelabel.sh | 9 +++------ 1 file 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 -- cgit v1.2.3