diff options
author | Sven Gothel <[email protected]> | 2023-05-21 00:10:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-21 00:10:33 +0200 |
commit | bd71ec59a41c8c847198622f7bd914b0019729ea (patch) | |
tree | 6797e3c141cbee6336ffeb8cdb8c97f577e6d56e | |
parent | 6d0a4c464559c53581c7e15b6c439050abdfc68a (diff) |
Maven: Make 'atomics' and 'extras' fully optional
-rwxr-xr-x | maven/make-copy-jars-one.sh | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/maven/make-copy-jars-one.sh b/maven/make-copy-jars-one.sh index 657e76b..a925e31 100755 --- a/maven/make-copy-jars-one.sh +++ b/maven/make-copy-jars-one.sh @@ -155,39 +155,47 @@ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}" # Copy atomics, if necessary # -ATOMICS=`cat projects/${NAME}/atomics` || exit 1 -if [ ! -z "${ATOMICS}" ] -then - info "atomics: ${ATOMICS}" - for ATOMIC in ${ATOMICS} - do - JAR_NAME="${NAME}-${VERSION}-${ATOMIC}.jar" - SOURCE="${INPUT}/jar/atomic/${NAME}-${ATOMIC}.jar" - TARGET="output/${NAME}/${VERSION}/${JAR_NAME}" - copy "${SOURCE}" "${TARGET}" - echo "${JAR_NAME}" >> "${MANIFEST_FILE}" - done +if [ -e projects/${NAME}/atomics ] ; then + ATOMICS=`cat projects/${NAME}/atomics` || exit 1 + if [ ! -z "${ATOMICS}" ] + then + info "atomics: ${ATOMICS}" + for ATOMIC in ${ATOMICS} + do + JAR_NAME="${NAME}-${VERSION}-${ATOMIC}.jar" + SOURCE="${INPUT}/jar/atomic/${NAME}-${ATOMIC}.jar" + TARGET="output/${NAME}/${VERSION}/${JAR_NAME}" + copy "${SOURCE}" "${TARGET}" + echo "${JAR_NAME}" >> "${MANIFEST_FILE}" + done + else + info "atomics: no atomics required for ${NAME}" + fi else - info "atomics: no atomics required" + info "atomics: no atomics desired for ${NAME}" fi #------------------------------------------------------------------------ # Copy extras, if necessary # -EXTRAS=`cat projects/${NAME}/extras` || exit 1 -if [ ! -z "${EXTRAS}" ] -then - info "extras: ${EXTRAS}" - for EXTRA in ${EXTRAS} - do - JAR_NAME="${NAME}-${VERSION}-${EXTRA}.jar" - SOURCE="${INPUT}/jar/${NAME}-${EXTRA}.jar" - TARGET="output/${NAME}/${VERSION}/${JAR_NAME}" - copy "${SOURCE}" "${TARGET}" - echo "${JAR_NAME}" >> "${MANIFEST_FILE}" - done +if [ -e projects/${NAME}/extras ] ; then + EXTRAS=`cat projects/${NAME}/extras` || exit 1 + if [ ! -z "${EXTRAS}" ] + then + info "extras: ${EXTRAS}" + for EXTRA in ${EXTRAS} + do + JAR_NAME="${NAME}-${VERSION}-${EXTRA}.jar" + SOURCE="${INPUT}/jar/${NAME}-${EXTRA}.jar" + TARGET="output/${NAME}/${VERSION}/${JAR_NAME}" + copy "${SOURCE}" "${TARGET}" + echo "${JAR_NAME}" >> "${MANIFEST_FILE}" + done + else + info "extras: no extras required for ${NAME}" + fi else - info "extras: no extras required" + info "extras: no extras desired for ${NAME}" fi |