spiegel-keyman/android/KMAPro/build.sh
darcywong00 90529e5239 Fix KMAPro/build.sh to use bash instead of sh
A Linux user reports issues building KMAPro because the script uses bash syntax instead of sh.
```
while [[ $# -gt 0 ]] ; do
```

KMEA is already using `#!/bin/bash`
2018-02-02 15:51:42 +07:00

45 lines
703 B
Bash
Executable file

#!/bin/bash
# Build KMAPro
display_usage ( ) {
echo "build.sh [-no-daemon]"
echo
echo "Build Keyman for Android"
echo " -no-daemon Don't start the Gradle daemon. Use for CI"
exit 1
}
echo Build KMAPro
#
# Prevents 'clear' on exit of mingw64 bash shell
#
SHLVL=0
NO_DAEMON=false
# Parse args
while [[ $# -gt 0 ]] ; do
key="$1"
case $key in
-no-daemon)
NO_DAEMON=true
;;
-h|-?)
display_usage
;;
esac
shift # past argument
done
echo
echo "NO_DAEMON: $NO_DAEMON"
echo
if [ "$NO_DAEMON" = true ]; then
DAEMON_FLAG=--no-daemon
else
DAEMON_FLAG=
fi
./gradlew $DAEMON_FLAG clean build