Compare commits

...

2 commits

2 changed files with 5 additions and 4 deletions

View file

@ -1,3 +1,5 @@
#!/bin/sh
kotlinc app/src/main/kotlin/de/jotoho/waituntil/*.kt -jvm-target 16 -include-runtime -d waituntil.jar
# shellcheck disable=SC2046
# 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,9 +23,8 @@ fun main(args: Array<String>) {
options.add(arg.substring(startIndex=2))
}
else if (arg.startsWith('-')) {
val translation = optionDictionary[arg]
if (translation != null)
options.add(translation.substring(startIndex=2))
if (optionDictionary.containsKey(arg))
options.add(optionDictionary[arg]!!.substring(startIndex=2))
else
System.err.println("Short-hand '$arg' does not exist. Ignoring!")
}