diff --git a/scripts/macOS/internal/2a_appbundle.sh b/scripts/macOS/internal/2a_appbundle.sh index fb3dfb4c7..856fa5f4a 100644 --- a/scripts/macOS/internal/2a_appbundle.sh +++ b/scripts/macOS/internal/2a_appbundle.sh @@ -31,9 +31,16 @@ do ARGUMENTS="${ARGUMENTS} -executable=${plugin}" done -${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \ - $ARGUMENTS +# Make sure that deploy succeeds +if ${QT_DIR}macdeployqt $INSTALL_PATH/$APPNAME \ + $ARGUMENTS; \ +then + # remove everything from install path, except the appbundle + cd $INSTALL_PATH + ls | grep -xv "${APPNAME}" | xargs rm -# remove everything from install path, except the appbundle -cd $INSTALL_PATH -ls | grep -xv "${APPNAME}" | xargs rm \ No newline at end of file + echo "$INSTALL_PATH is now a self contained meshlab application" +else + echo "macdeployqt failed with error code $?. Script was not completed successfully." + exit 1 +fi \ No newline at end of file