projects
/
jprojects-scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The last commit from my workplace removed push-stick.sh, which was not intended.
[jprojects-scripts.git]
/
build-dist-all.sh
diff --git
a/build-dist-all.sh
b/build-dist-all.sh
index 173810702ae30242f97be338c209f4b172f8d3db..aeb747e0229f676d250dad92a20bf9f1a6c645f4 100755
(executable)
--- a/
build-dist-all.sh
+++ b/
build-dist-all.sh
@@
-2,9
+2,15
@@
. ./.jprojects.sh || exit 255
. ./.jprojects.sh || exit 255
-for DIST in ${LIST}; do
- echo "$0: Executing '${DIST}' ..."
- P=${DIST%/*}
+for project in ${LIST}; do
+ if [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ then
+ echo "$0: Project '${project}' does not exist."
+ continue;
+ fi
+
+ echo "$0: Executing '${project}' ..."
+ P=${project%/*}
echo "$0: P='${P}'"
cd "${JPROJECTS_HOME}/${P}" || exit 255
echo "$0: P='${P}'"
cd "${JPROJECTS_HOME}/${P}" || exit 255
@@
-15,10
+21,10
@@
for DIST in ${LIST}; do
continue
fi
continue
fi
- if [ "$1" != "d" ]
+ if [
-x "${ANT_BIN}" -a
"$1" != "d" ]
then
# Cleanup project and build JAR
then
# Cleanup project and build JAR
-
ant
clean jar
+
${ANT_BIN}
clean jar
# Save status
STATUS="$?"
# Save status
STATUS="$?"
@@
-27,13
+33,13
@@
for DIST in ${LIST}; do
if [ "${STATUS}" != "0" ]
then
# This has failed, so try "dist"
if [ "${STATUS}" != "0" ]
then
# This has failed, so try "dist"
-
ant
clean dist
+
${ANT_BIN}
clean dist
STATUS="$?"
# Still failing? Oh, to bad
if [ "${STATUS}" != "0" ]
then
STATUS="$?"
# Still failing? Oh, to bad
if [ "${STATUS}" != "0" ]
then
- echo "$0: Failed to build '${
DIST
}'."
+ echo "$0: Failed to build '${
project
}'."
exit 1
fi
fi
exit 1
fi
fi
@@
-41,13
+47,18
@@
for DIST in ${LIST}; do
if [ ! -f "./dist.sh" ]
then
if [ ! -f "./dist.sh" ]
then
- echo "$0: Project '${
DIST
}' has no dist.sh"
+ echo "$0: Project '${
project
}' has no dist.sh"
elif [ ! -e "./dist.sh" ]
then
elif [ ! -e "./dist.sh" ]
then
- echo "$0: Error: Project '${
DIST
}' has non-executable dist.sh!"
+ echo "$0: Error: Project '${
project
}' has non-executable dist.sh!"
exit 1
else
exit 1
else
- ./dist.sh
+ if [ "$1" = "r" ]
+ then
+ ./dist.sh r
+ else
+ ./dist.sh
+ fi
fi
done
fi
done