From 8583389d2b122f220290cad3a6387f2e4cbb404c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 16 May 2023 00:47:31 +0200 Subject: [PATCH] Continued: - ANT_BIN should be executable, let's test this in .jprojects.sh - nice messages added --- .jprojects.sh | 4 ++++ build-dist-all.sh | 8 +++++--- build-dist-cores.sh | 4 ++-- build-dist-libs.sh | 8 +++++--- make-javadoc.sh | 12 +++++++----- 5 files changed, 23 insertions(+), 13 deletions(-) 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 ..." -- 2.39.5