2021-01-23 18:51:23 +00:00
|
|
|
#!/bin/sh
|
2023-11-04 18:08:39 +00:00
|
|
|
# Execute a gradle task (by default "test") until it fails
|
2021-01-23 18:51:23 +00:00
|
|
|
code=0
|
|
|
|
case "$1" in ([0-9]*) code=$1; shift;; esac
|
|
|
|
|
|
|
|
task="${1:-test}"
|
|
|
|
test $# -gt 1 && prefix=":$2:"
|
2021-07-04 21:22:53 +00:00
|
|
|
gradle=$(test -x "./gradlew"; expr gradle \& $? \| ./gradlew)
|
2021-01-23 18:51:23 +00:00
|
|
|
|
2021-07-04 21:22:53 +00:00
|
|
|
( exit $code )
|
|
|
|
while test $? -eq $code
|
|
|
|
do $gradle ${prefix}clean$(echo $task | sed -e 's/^./\U&/') ${prefix}$task "${@:3}"
|
|
|
|
done
|