aboutsummaryrefslogtreecommitdiff
path: root/font_lib/tools/make_font_lua.sh
diff options
context:
space:
mode:
Diffstat (limited to 'font_lib/tools/make_font_lua.sh')
-rwxr-xr-xfont_lib/tools/make_font_lua.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/font_lib/tools/make_font_lua.sh b/font_lib/tools/make_font_lua.sh
index 4559341..607ff95 100755
--- a/font_lib/tools/make_font_lua.sh
+++ b/font_lib/tools/make_font_lua.sh
@@ -1,9 +1,9 @@
#!/bin/bash
-scriptname=$0
+scriptname=$(basename $0)
identify="identify"
-font_name=default
+font_name=$1
for f in textures/font_${font_name}_????.png
do
@@ -46,3 +46,11 @@ font_lib.register_font(
);
" > font_$font_name.lua
+if grep -q font_lib depends.txt &>/dev/null
+then
+ echo "font_lib already in depends.txt."
+else
+ echo "adding font_lib to depends.txt."
+ echo "font_lib" >> depends.txt
+fi
+