summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-10-06 18:11:48 -0600
committerKeith Packard <keithp@keithp.com>2018-10-06 18:11:48 -0600
commitcabfcb078950238cdaee4e6ec4702195feaabc7b (patch)
treefe43d327dc9d5beec4fcd265a9649777a5fb656a
parente405ec771b812f0ff78abbe813c3a793ae129487 (diff)
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 <keithp@keithp.com>
-rw-r--r--map-server/altos-mapd/AltosMapd.java7
1 files changed, 6 insertions, 1 deletions
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 <map-directory>\n");
+ System.exit(1);
+ }
+
+ AltosPreferences.mapdir = new File(args[0]);
for (;;) {
Socket client = server.accept();