From: Keith Packard Date: Sun, 7 Oct 2018 00:11:48 +0000 (-0600) Subject: altos-mapd: Use command line to pass map directory in X-Git-Tag: 1.8.7~3^2~31^2~1 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=cabfcb078950238cdaee4e6ec4702195feaabc7b altos-mapd: Use command line to pass map directory in Don't bother with a default value, just require a command line param. Signed-off-by: Keith Packard --- diff --git a/map-server/altos-mapd/AltosMapd.java b/map-server/altos-mapd/AltosMapd.java index cfa1ef35..9c39adb1 100644 --- a/map-server/altos-mapd/AltosMapd.java +++ b/map-server/altos-mapd/AltosMapd.java @@ -35,7 +35,12 @@ public class AltosMapd { AltosPreferences.init(new AltosMapdPreferences()); - AltosPreferences.mapdir = new File("/home/keithp/misc/rockets/flights/maps"); + if (args.length < 1) { + System.out.printf("usage: altos-mapd \n"); + System.exit(1); + } + + AltosPreferences.mapdir = new File(args[0]); for (;;) { Socket client = server.accept();