diff --git a/compile.sh b/compile.sh index 453ab27..e34fffe 100755 --- a/compile.sh +++ b/compile.sh @@ -12,7 +12,16 @@ then exit; fi; +function is_truthy() { + local value; + value="$1"; + [ ! -z "$value" ] || + [ "$value" != "0" ] || + [ "$value" != "false" ] || + [ "$value" != "n" ] || + [ "$value" != "no" ]; +} function handle_status() { if [ $1 -ne 0 ]; then @@ -216,7 +225,7 @@ then errorPatterns+=("\(\)\(.*\)\(([[:digit:]]\+): \(warning\|note\|error\): \([A-Z0-9]\+: \)\?.*\)$") errorPatterns+=("\(\"\)\(.*\)\(\", line [[:digit:]]\+\( (column [[:digit:]]\+)\)\?: \(Warning\|Error\): [A-Z0-9]\+: .*\)$"); - if [ ! -z "${USE_WINDOWS_PATHS}" ] + if is_truthy "${USE_WINDOWS_PATHS}" then echo "Help me! I am forced to use windows paths, omgg!"; fixCommand="wslpath -m";