altosui: ensure that 'altosui' script is installed. Pass arguments along.
authorKeith Packard <keithp@keithp.com>
Sun, 5 Sep 2010 09:05:06 +0000 (02:05 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 5 Sep 2010 09:05:06 +0000 (02:05 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/Makefile.am
ao-tools/altosui/altosui-fat

index 9848282..dd4b31e 100644 (file)
@@ -3,6 +3,8 @@ AM_JAVACFLAGS=-encoding UTF-8
 
 CLASSPATH_ENV=CLASSPATH=".:classes:../libaltos:$(FREETTS)/*:/usr/share/java/*"
 
+bin_SCRIPTS=altosui
+
 altosui_JAVA = \
        AltosChannelMenu.java \
        AltosConfig.java \
@@ -129,12 +131,12 @@ Manifest-fat.txt:
 
 altosui: Makefile
        echo "#!/bin/sh" > $@
-       echo 'exec java  -cp "$(FREETTS)/*" -Djava.library.path="$(libdir)" -jar "$(altosuidir)/altosui.jar"' >> $@
+       echo 'exec java  -cp "$(FREETTS)/*" -Djava.library.path="$(libdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@
        chmod +x $@
 
 altosui-test: Makefile
        echo "#!/bin/sh" > $@
-       echo 'exec java -cp "$(FREETTS)/*" -Djava.library.path="../libaltos" -jar altosui.jar' >> $@
+       echo 'exec java -cp "$(FREETTS)/*" -Djava.library.path="../libaltos" -jar altosui.jar "$$*"' >> $@
        chmod +x $@
 
 $(LIBALTOS):
index 9e5a8f1..95b1c05 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 me=`which "$0"`
 dir=`dirname "$me"`
-exec java -cp "$dir/*" -Djava.library.path="$dir" -jar "$dir"/altosui-fat.jar
+exec java -cp "$dir/*" -Djava.library.path="$dir" -jar "$dir"/altosui-fat.jar  "$@"