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."
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
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
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
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}")
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 ..."