Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 20:35:24 +0000 (22:35 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 20:35:24 +0000 (22:35 +0200)
- also check for ssh/scp binaries
- added jbonuscard-core/lib
- fixed make-javadoc.sh

Signed-off-by: Roland Häder <roland@mxchange.org>
.jprojects.sh
make-javadoc.sh

index 802e0ef..ab449f2 100644 (file)
@@ -19,6 +19,7 @@ LIBRARIES="jcore-utils jcore jcoreee \
        jmailer-ee \
        jcore-swing \
        jcustomer-core jcustomer-lib \
+       jbonuscard-core jbonuscard-lib \
        jproduct-core jproduct-lib \
        jshop-core jshop-lib \
        jshop-receipt-core jshop-receipt-lib"
@@ -47,14 +48,24 @@ ALL_PROJECTS="${THIS} ${LIBRARIES} ${APPLICATIONS} ${COMPANY_PROJECTS} ${UNMAINT
 # Own home directory
 declare -r JPROJECTS_HOME="${PWD}"
 
-# ant binary
+# All programs
 ANT_BIN=$(which ant 2>/dev/null)
+SCP_BIN=$(which scp 2>/dev/null)
+SSH_BIN=$(which ssh 2>/dev/null)
 
 # Check binary
 if [ -z "${ANT_BIN}" ]
 then
        echo "$0: Cannot find ANT binary."
        exit 1
+elif [ -z "${SCP_BIN}" ]
+then
+       echo "$0: Cannot find SCP binary."
+       exit 1
+elif [ -z "${SSH_BIN}" ]
+then
+       echo "$0: Cannot find SSH binary."
+       exit 1
 fi
 
 # Test on .git availability"
index baaf0ff..0af732e 100755 (executable)
@@ -20,6 +20,15 @@ for project in ${LIST}; do
                continue
        fi
 
+       IS_BASE_PROJECT=$(echo "${BASE_APPLICATION_NAMES}" | grep "${project}")
+
+       if [ -n "${IS_BASE_PROJECT}" ]
+       then
+               echo "$0: Project '${project}' is a base project, won't have Javadoc. Skipped ..."
+               continue
+       fi
+
+       echo "$0: Working on project '${project}' ..."
        cd "${JPROJECTS_HOME}/${project}" || exit 255
 
        HAS_FILE=$(find src/ -type f)
@@ -34,7 +43,7 @@ for project in ${LIST}; do
        rm -rf dist/javadoc/
 
        echo "$0: Generating documentation for '${project}' ..."
-       ant javadoc > dist/javadoc.log || exit 255
+       ${ANT_BIN} javadoc > dist/javadoc.log || exit 255
 
        IS_COMPANY_PROJECT=$(echo "${COMPANY_PROJECTS}" | grep "${project}")
        if [ -n "${IS_COMPANY_PROJECT}" -a -z "$1" ]
@@ -44,13 +53,13 @@ for project in ${LIST}; do
        fi
 
        echo "$0: Generating 'javadoc/${project}' on remote server ..."
-       ssh "${UPLOAD_SERVER}" "mkdir -v \"${UPLOAD_BASE_PATH}/${project}\""
+       ${SSH_BIN} "${UPLOAD_SERVER}" "mkdir -vp \"${UPLOAD_BASE_PATH}/${project}\""
 
        echo "$0: Cleaning 'javadoc/${project}' on remote server ..."
-       ssh "${UPLOAD_SERVER}" "rm  -rf \"${UPLOAD_BASE_PATH}/${project}\"/*" || exit 255
+       ${SSH_BIN} "${UPLOAD_SERVER}" "rm  -rf \"${UPLOAD_BASE_PATH}/${project}\"/*" || exit 255
 
        echo "$0: Uploading Javadoc for '${project}' ..."
-       scp -r dist/javadoc/* "${UPLOAD_SERVER}:${UPLOAD_BASE_PATH}/${project}" || exit 255
+       ${SCP_BIN} -r dist/javadoc/* "${UPLOAD_SERVER}:${UPLOAD_BASE_PATH}/${project}" || exit 255
 
        echo "$0: Cleaning local documentation for '${project}' ..."
        rm -rf dist/javadoc/