--- /dev/null
+# Auto detect text files and perform LF normalization
+* text=auto
# Own home directory
declare -r JPROJECTS_HOME="${PWD}"
+# ant binary
+ANT_BIN=`which ant`
+
# Test on .git availability"
for project in ${LIST}; do
if [ ! -d "${project}" ]
then
echo "$0: Project '${project}' not created."
- exit 1
elif [ ! -f "${project}/.git/config" ]
then
echo "$0: Project '${project}' is no GIT project."
. ./.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
continue
fi
- if [ "$1" != "d" ]
+ if [ -x "${ANT_BIN}" -a "$1" != "d" ]
then
# Cleanup project and build JAR
- ant clean jar
+ ${ANT_BIN} clean jar
# Save status
STATUS="$?"
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
- echo "$0: Failed to build '${DIST}'."
+ echo "$0: Failed to build '${project}'."
exit 1
fi
fi
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
- echo "$0: Error: Project '${DIST}' has non-executable dist.sh!"
+ echo "$0: Error: Project '${project}' has non-executable dist.sh!"
exit 1
else
./dist.sh
then
echo "$0: Skipping jprojects-scripts ..."
continue
- elif [ -f "${project}/dist.sh" ]
+ elif [ -f "${JPROJECTS_HOME}/${project}/dist.sh" ]
then
echo "$0: Copying dist.sh to '${project}' ..."
- cp -v dist.sh "${project}/" || exit 255
+ cp -v dist.sh "${JPROJECTS_HOME}/${project}/" || exit 255
fi
- if [ ! -d "${project}/docs" -o "$1" = "f" ]
+ if [ -d "${JPROJECTS_HOME}/${project}" -a ! -d "${JPROJECTS_HOME}/${project}/docs" -o "$1" = "f" ]
then
echo "$0: GNU-ifying project '${project}' ..."
- mkdir --parent "${project}/docs" || exit 255
- cp -rpv docs/* "${project}/docs/" || exit 255
+ mkdir --parent "${JPROJECTS_HOME}/${project}/docs" || exit 255
+ cp -rpv docs/* "${JPROJECTS_HOME}/${project}/docs/" || exit 255
cd "${JPROJECTS_HOME}/${project}"
echo "$0: git add ..."
git add docs || exit 255
# Remote SSH server (password-less access)
GLASSFISH_SSH_SERVER="www.mxchange.org"
+# Windows personal domain
+PERSONAL_DOMAIN_PATH="${HOME}/personal_domain/lib"
+
# Generate list
LIST=`find ../*/lib/${NAME}.jar`
LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`"
LIST="${LIST} ${GLASSFISH_BASE_PATH}"
fi
+if [ -d "${PERSONAL_DOMAIN_PATH}" ]
+then
+ echo "$0: Personal domain found, adding to LIST ..."
+ LIST="${LIST} ${PERSONAL_DOMAIN_PATH}"
+fi
+
if [ ! -f "${DIST}" ]
then
echo "$0: '${DIST}' not found."
mkdir -vp "${WILDFLY_MODULE_PATH}"
fi
-for target in ${LIST};
+for project in ${LIST};
do
- if [ -d "${target}" ]
+ if [ -d "${project}" ]
then
- cp -v "${DIST}" "${target}"
- elif [ -f "${target}" ]
+ cp -v "${DIST}" "${project}"
+ elif [ -f "${project}" ]
then
- cp -v "${DIST}" "${target}"
+ cp -v "${DIST}" "${project}"
else
- echo "$0: Target '${target}' not found."
+ echo "$0: Project '${project}' not found."
fi
done
. ./.jprojects.sh || exit 255
-for ENTRY in ${LIST}; do
- cd "${ENTRY}" || exit 255
+for project in ${LIST}; do
+ if [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ then
+ echo "$0: Project '${project}' does not exist."
+ continue;
+ fi
+
+ cd "${JPROJECTS_HOME}/${project}" || exit 255
if [ "$1" = "c" ]
then
- echo "$0: Checkout '${ENTRY}' ..."
+ echo "$0: Checkout '${project}' ..."
git checkout -- .
fi
- echo "$0: Pulling '${ENTRY}' ..."
+ echo "$0: Pulling '${project}' ..."
git pull transport master || exit 255
- echo "$0: Rebasing '${ENTRY}' ..."
+ echo "$0: Rebasing '${project}' ..."
git rebase origin/master || exit 255
- cd -
done
fi
for project in ${LIST}; do
+ if [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ then
+ echo "$0: Project '${project}' does not exist."
+ continue;
+ fi
+
echo "$0: Processing '${project}',mode='$1' ..."
cd "${JPROJECTS_HOME}/${project}" || exit 255