From: Roland Häder Date: Mon, 15 May 2023 22:47:31 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8583389d2b122f220290cad3a6387f2e4cbb404c;p=jprojects-scripts.git Continued: - ANT_BIN should be executable, let's test this in .jprojects.sh - nice messages added --- diff --git a/.jprojects.sh b/.jprojects.sh index a024aeb..156bbd3 100644 --- a/.jprojects.sh +++ b/.jprojects.sh @@ -58,6 +58,10 @@ if [ -z "${ANT_BIN}" ] then echo "$0: Cannot find ANT binary." exit 1 +elif [ ! -x "${ANT_BIN}" ] +then + echo "$0: '${ANT_BIN}' is not executable!" + exit 1 elif [ -z "${SCP_BIN}" ] then echo "$0: Cannot find SCP binary." diff --git a/build-dist-all.sh b/build-dist-all.sh index 57775ca..a262c7f 100755 --- a/build-dist-all.sh +++ b/build-dist-all.sh @@ -19,21 +19,23 @@ for project in ${LIST}; do echo "$0: P='${P}'" cd "${JPROJECTS_HOME}/${P}" || exit 255 - if [ ! -e "build.xml" ] + if [ ! -f "build.xml" ] then echo "$0: No build.xml found, skipping project '${P}'." continue fi - if [ -x "${ANT_BIN}" -a "$1" != "d" ] + if [ "$1" != "d" ] then if [ "$1" = "c" ] then # Cleanup - ${ANT_BIN} clean + echo "$0: Cleaning up '${project}' ..." + "${ANT_BIN}" clean fi # Build JAR + echo "$0: Building JAR for '${project}' ..." "${ANT_BIN}" jar # Save status diff --git a/build-dist-cores.sh b/build-dist-cores.sh index defc3e9..f479bf9 100755 --- a/build-dist-cores.sh +++ b/build-dist-cores.sh @@ -29,13 +29,13 @@ for project in ${LIST}; do continue fi - if [ -x "${ANT_BIN}" -a "$1" != "d" ] + if [ "$1" != "d" ] then if [ "$1" = "c" ] then # Cleanup echo "$0: Cleaning up '${project}' ..." - ${ANT_BIN} clean + "${ANT_BIN}" clean fi # Build JAR diff --git a/build-dist-libs.sh b/build-dist-libs.sh index 0260908..963971e 100755 --- a/build-dist-libs.sh +++ b/build-dist-libs.sh @@ -25,21 +25,23 @@ for project in ${LIST}; do echo "$0: P='${P}'" cd "${JPROJECTS_HOME}/${P}" || exit 255 - if [ ! -e "build.xml" ] + if [ ! -f "build.xml" ] then echo "$0: No build.xml found, skipping project '${P}'." continue fi - if [ -x "${ANT_BIN}" -a "$1" != "d" ] + if [ "$1" != "d" ] then if [ "$1" = "c" ] then # Cleanup - ${ANT_BIN} clean + echo "$0: Cleaning up '${project}' ..." + "${ANT_BIN}" clean fi # Build JAR + echo "$0: Building JAR for '${project}' ..." "${ANT_BIN}" jar # Save status diff --git a/make-javadoc.sh b/make-javadoc.sh index 313f985..bd5c46f 100755 --- a/make-javadoc.sh +++ b/make-javadoc.sh @@ -42,8 +42,14 @@ for project in ${LIST}; do echo "$0: Cleaning up Javadoc for '${project}' ..." rm -rf dist/javadoc/ + if [ -f "src/.gitkeep" ] + then + echo "$0: project='${project}' has a .gitkeep file in 'src', won't scan." + continue + fi + echo "$0: Generating documentation for '${project}' ..." - ${ANT_BIN} javadoc > dist/javadoc.log || exit 255 + "${ANT_BIN}" javadoc > dist/javadoc.log || exit 255 rm -fv dist/javadoc.log IS_COMPANY_PROJECT=$(echo "${COMPANY_PROJECTS}" | grep "${project}") @@ -51,10 +57,6 @@ for project in ${LIST}; do then echo "$0: Not uploading company project='${project}'" continue - elif [ -f "src/.gitkeep" ] - then - echo "$0: project='${project}' has a .gitkeep file in 'src', won't scan." - continue fi echo "$0: Generating 'javadoc/${project}' on remote server ..."