2021-01-23 18:51:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Execute a gradle task (default test) until it fails
|
|
|
|
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
|