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"
# 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"
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)
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" ]
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/