X-Git-Url: https://git.mxchange.org/?p=jprojects-scripts.git;a=blobdiff_plain;f=build-dist-all.sh;h=c5ae10febf7425071e9b9dbf07be4e23571cca01;hp=173810702ae30242f97be338c209f4b172f8d3db;hb=2d1c7a86f55775c9c4aed22f7c0b7a997f9d8228;hpb=612c0632dbfccc85c923aa5c8b85a5f8db69901b diff --git a/build-dist-all.sh b/build-dist-all.sh index 1738107..c5ae10f 100755 --- a/build-dist-all.sh +++ b/build-dist-all.sh @@ -2,9 +2,19 @@ . ./.jprojects.sh || exit 255 -for DIST in ${LIST}; do - echo "$0: Executing '${DIST}' ..." - P=${DIST%/*} +for project in ${LIST}; do + if [ "${project}" = "jprojects-scripts" ] + then + echo "$0: Skipping jprojects-scripts ..." + continue + elif [ ! -d "${JPROJECTS_HOME}/${project}" ] + then + echo "$0: Project '${project}' does not exist." + continue + fi + + echo "$0: Executing '${project}' ..." + P=${project%/*} echo "$0: P='${P}'" cd "${JPROJECTS_HOME}/${P}" || exit 255 @@ -15,10 +25,10 @@ for DIST in ${LIST}; do continue fi - if [ "$1" != "d" ] + if [ -x "${ANT_BIN}" -a "$1" != "d" ] then # Cleanup project and build JAR - ant clean jar + ${ANT_BIN} clean jar # Save status STATUS="$?" @@ -27,13 +37,13 @@ for DIST in ${LIST}; do if [ "${STATUS}" != "0" ] then # This has failed, so try "dist" - ant clean dist + ${ANT_BIN} clean dist STATUS="$?" # Still failing? Oh, to bad if [ "${STATUS}" != "0" ] then - echo "$0: Failed to build '${DIST}'." + echo "$0: Failed to build '${project}'." exit 1 fi fi @@ -41,13 +51,18 @@ for DIST in ${LIST}; do if [ ! -f "./dist.sh" ] then - echo "$0: Project '${DIST}' has no dist.sh" + echo "$0: Project '${project}' has no dist.sh" elif [ ! -e "./dist.sh" ] then - echo "$0: Error: Project '${DIST}' has non-executable dist.sh!" + echo "$0: Error: Project '${project}' has non-executable dist.sh!" exit 1 else - ./dist.sh + if [ "$1" = "r" ] + then + ./dist.sh r + else + ./dist.sh + fi fi done