diff --git a/compile.sh b/compile.sh index 507ee01..81b44f0 100755 --- a/compile.sh +++ b/compile.sh @@ -1,5 +1,5 @@ #!/bin/sh -(cd snippets && mvn clean spotless:apply) -(cd snippets && ./compile.sh) +(cd snippets && mvn clean spotless:apply) || exit 1 +(cd snippets && ./compile.sh) ||exit 1 diff --git a/snippets/compile.sh b/snippets/compile.sh index eb921f1..167484f 100755 --- a/snippets/compile.sh +++ b/snippets/compile.sh @@ -6,9 +6,5 @@ echo "Compiling snippets:" for snippet in $SNIPPETS do echo " - Snippet: $snippet" - mvn compile -Dsnippet="$(dirname $snippet)" - if [ $? -ne 0 ] - then - exit $? - fi + mvn compile -Dsnippet="$(dirname $snippet)" || exit 1 done