aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--d2iver.pl4
-rwxr-xr-xdla2img.sh5
3 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 15a4ac9..ae406f0 100644
--- a/Makefile
+++ b/Makefile
@@ -9,13 +9,16 @@ PERL=perl
CC=cc
CFLAGS=-O2 -Wall
-all: dla.xex dla2csv dla2csv.xex
+all: dla.xex dla2csv dla2csv.xex dla2img.sh
dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s dlaver.h
$(CL65) $(CL65FLAGS) -l dla.list -Ln dla.labels -t none -o dla.xex dla.s
dla2csv.xex: dla2csv.c dlaver.h
+dla2img.sh: VERSION
+ $(PERL) d2iver.pl dla2img.sh
+
dlatbl.s: mkdlatbl.pl
$(PERL) mkdlatbl.pl > dlatbl.s
diff --git a/d2iver.pl b/d2iver.pl
new file mode 100644
index 0000000..b6cc951
--- /dev/null
+++ b/d2iver.pl
@@ -0,0 +1,4 @@
+#!/usr/bin/perl -w -i -p
+
+BEGIN { chomp($v=`cat VERSION`) }
+/^VERSION=/ && s,=.*,=$v,;
diff --git a/dla2img.sh b/dla2img.sh
index 4258947..808f688 100755
--- a/dla2img.sh
+++ b/dla2img.sh
@@ -15,6 +15,9 @@
SELF="`basename $0`"
+# This line may get changed by the Makefile (do not hand-edit):
+VERSION=0.2.1
+
# allow overriding magick path via environment.
if [ "$MAGICK" = "" ]; then
MAGICK="magick"
@@ -31,7 +34,7 @@ OUTFILE="$2"
if [ -z "$INFILE" -o -z "$OUTFILE" -o "$INFILE" = "-h" -o "$INFILE" = "--help" ]; then
cat <<EOF
-$SELF - convert saved files from dla.xex to image files.
+$SELF v$VERSION - convert dla.xex saved files to image files.
Usage: $SELF [dla-file] [image-file] <magick-arguments ...>