Compare commits

..

No commits in common. "5a80ac71698564ed0132d65a203dae7ec9f85e26" and "a48f1222961023266799f9c8a8932f379af41399" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View file

@ -1,5 +1,3 @@
#!/bin/sh #!/bin/sh
# shellcheck disable=SC2046 kotlinc app/src/main/kotlin/de/jotoho/waituntil/*.kt -jvm-target 16 -include-runtime -d waituntil.jar
# Word splitting in find results is intentional!
kotlinc $(find src/main -type f -iname '*.kt') -jvm-target 16 -include-runtime -d waituntil.jar

View file

@ -23,8 +23,9 @@ fun main(args: Array<String>) {
options.add(arg.substring(startIndex=2)) options.add(arg.substring(startIndex=2))
} }
else if (arg.startsWith('-')) { else if (arg.startsWith('-')) {
if (optionDictionary.containsKey(arg)) val translation = optionDictionary[arg]
options.add(optionDictionary[arg]!!.substring(startIndex=2)) if (translation != null)
options.add(translation.substring(startIndex=2))
else else
System.err.println("Short-hand '$arg' does not exist. Ignoring!") System.err.println("Short-hand '$arg' does not exist. Ignoring!")
} }