Fixed ctrl-c for the gradle build
This commit is contained in:
parent
b94b33ecf1
commit
6cb0a2ddf0
1 changed files with 14 additions and 3 deletions
17
run.sh
17
run.sh
|
|
@ -5,15 +5,15 @@
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
|
|
||||||
function printHelp() {
|
function printHelp() {
|
||||||
echo "Run code analysis through SonarQube.
|
echo "Wrapper for simplifying execution of Hal Server.
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
$(basename $0)
|
$(basename $0)
|
||||||
[-f|--foreground]
|
[-f|--foreground]
|
||||||
[-h|--help]
|
[-h|--help]
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
--foreground Run Hal Server in the foreground instead of detatching a new screen.
|
--foreground Run Hal Server in the foreground instead of detaching a new screen.
|
||||||
--help Print this help message.
|
--help Print this help message.
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
@ -27,8 +27,15 @@ until [[ $# -eq 0 ]]; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-h|--help)
|
||||||
|
printHelp
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "ERROR: Unknown input parameter: $1=$2"
|
echo "ERROR: Unknown input parameter: $1=$2"
|
||||||
|
echo ""
|
||||||
|
printHelp
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -40,6 +47,10 @@ done
|
||||||
# Execute
|
# Execute
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
|
|
||||||
|
# gradle returns normally when doing ctr-c so we need to add a
|
||||||
|
# trap where the bash script exits instead of continuing.
|
||||||
|
trap 'exit 130' INT
|
||||||
|
|
||||||
# Build Hal source
|
# Build Hal source
|
||||||
./gradlew build
|
./gradlew build
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue