Throw an error if the output directory does not exist

This commit is contained in:
abcdefg30 2017-08-13 23:19:03 +02:00
parent f605793405
commit 82e2484c01
2 changed files with 11 additions and 0 deletions

View File

@ -58,6 +58,11 @@ if [ ! -f "${ENGINE_DIRECTORY}/Makefile" ]; then
exit 1 exit 1
fi fi
if [ ! -d "${OUTPUTDIR}" ]; then
echo "Output directory '${OUTPUTDIR}' does not exist.";
exit 1
fi
make version VERSION="${TAG}" make version VERSION="${TAG}"
pushd ${ENGINE_DIRECTORY} > /dev/null pushd ${ENGINE_DIRECTORY} > /dev/null
@ -83,6 +88,7 @@ modify_plist "{JOIN_SERVER_URL_SCHEME}" "openra-${MOD_ID}-${TAG}" "${PACKAGING_O
echo "Packaging zip archive" echo "Packaging zip archive"
zip "${PACKAGING_INSTALLER_NAME}-${TAG}" -r -9 "${PACKAGING_OSX_APP_NAME}" --quiet --symlinks zip "${PACKAGING_INSTALLER_NAME}-${TAG}" -r -9 "${PACKAGING_OSX_APP_NAME}" --quiet --symlinks
mv "${PACKAGING_INSTALLER_NAME}-${TAG}.zip" ${OUTPUTDIR} mv "${PACKAGING_INSTALLER_NAME}-${TAG}.zip" ${OUTPUTDIR}
popd > /dev/null popd > /dev/null

View File

@ -45,6 +45,11 @@ if [ ! -f "${ENGINE_DIRECTORY}/Makefile" ]; then
exit 1 exit 1
fi fi
if [ ! -d "${OUTPUTDIR}" ]; then
echo "Output directory '${OUTPUTDIR}' does not exist.";
exit 1
fi
make version VERSION="${TAG}" make version VERSION="${TAG}"
pushd ${ENGINE_DIRECTORY} > /dev/null pushd ${ENGINE_DIRECTORY} > /dev/null