]> git.mxchange.org Git - jprojects-scripts.git/blobdiff - build-dist-all.sh
Continued:
[jprojects-scripts.git] / build-dist-all.sh
index c5ae10febf7425071e9b9dbf07be4e23571cca01..a262c7fdfc7274bcfdbd3c857aa667c87368f90a 100755 (executable)
@@ -19,16 +19,24 @@ for project in ${LIST}; do
        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
-               # Cleanup project and build JAR
-               ${ANT_BIN} clean jar
+               if [ "$1" = "c" ]
+               then
+                       # Cleanup
+                       echo "$0: Cleaning up '${project}' ..."
+                       "${ANT_BIN}" clean
+               fi
+
+               # Build JAR
+               echo "$0: Building JAR for '${project}' ..."
+               "${ANT_BIN}" jar
 
                # Save status
                STATUS="$?"
@@ -37,7 +45,7 @@ for project in ${LIST}; do
                if [ "${STATUS}" != "0" ]
                then
                        # This has failed, so try "dist"
-                       ${ANT_BIN} clean dist
+                       "${ANT_BIN}" dist
                        STATUS="$?"
 
                        # Still failing? Oh, to bad