From e23745a13e28d04dbfe165c50a2f36edd7156188 Mon Sep 17 00:00:00 2001 From: Josh Haile <35245966+voxparcxls@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:36:44 -0700 Subject: [PATCH] IDS-9779: Fix modeler elements error (#138) * add warning to modeler installer * added warning to linux modeler script * add exit when elements JSON is missing * exiting echo --- install/modeler/install_linux_modeler.sh | 15 +++++++++++++++ install/modeler/install_mac_modeler.sh | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/install/modeler/install_linux_modeler.sh b/install/modeler/install_linux_modeler.sh index ceba0b90..95949b3c 100755 --- a/install/modeler/install_linux_modeler.sh +++ b/install/modeler/install_linux_modeler.sh @@ -1,5 +1,7 @@ #!/bin/bash +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + echo echo "Camunda Modeler Installer for Linux" echo @@ -7,6 +9,19 @@ echo "This will install the Camunda Modeler in this directory:" pwd echo +if [ ! -f "elements.json" ]; then + echo "****************************************" + echo "*************** WARNING ! **************" + echo "****************************************" + echo "+--------------------------------------+" + echo "File 'elements.json' does not exists in ${ROOT} directory " + echo "+--------------------------------------+" + echo + echo "Run the Camunda Modeler Installer from 'modeler/' folder or copy elements.json to '${ROOT}' before running modeler script " + echo "Exiting..." + exit 1 +fi + # Confirm Install while [[ ! $REPLY =~ ^(y|Y|n|N)$ ]]; do read -p "Press Y to continue or N to abort. (Y/N): " REPLY diff --git a/install/modeler/install_mac_modeler.sh b/install/modeler/install_mac_modeler.sh index b480bb38..54012b20 100755 --- a/install/modeler/install_mac_modeler.sh +++ b/install/modeler/install_mac_modeler.sh @@ -1,9 +1,24 @@ #!/bin/bash +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + echo echo "Camunda Modeler Installer for Mac OS" echo +if [ ! -f "elements.json" ]; then + echo "****************************************" + echo "*************** WARNING ! **************" + echo "****************************************" + echo "+--------------------------------------+" + echo "File 'elements.json' does not exists in ${ROOT} directory " + echo "+--------------------------------------+" + echo + echo "Run the Camunda Modeler Installer from 'modeler/' folder or copy elements.json to '${ROOT}' before running modeler script " + echo "Exiting..." + exit 1 +fi + if [ ! -d "/Applications" ]; then echo "Error: Cannot find '/Applications' directory. Is this a Mac OS machine?" echo "Exiting..."