From 82bca831b06fd475026c6ee6d6f0912bb65cb508 Mon Sep 17 00:00:00 2001 From: Jbsco <90524106+Jbsco@users.noreply.github.com> Date: Tue, 21 May 2024 22:40:20 -0600 Subject: [PATCH] Update COSMOS helper script to provide script usage example on error --- gnd/cosmos/install_cosmos_plugin.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gnd/cosmos/install_cosmos_plugin.sh b/gnd/cosmos/install_cosmos_plugin.sh index cc5c885..91550ad 100755 --- a/gnd/cosmos/install_cosmos_plugin.sh +++ b/gnd/cosmos/install_cosmos_plugin.sh @@ -10,12 +10,16 @@ adamant_assembly_name=$1 cosmos_install_name=$2 if [[ $1 == "" ]] then - echo "Adamant assembly location argument not provided, exiting." - exit 0 + echo "Adamant assembly name argument not provided." + echo "Usage: \"./install_cosmos_plugin.sh Adamant_assembly_name path_to_COSMOS_directory\"" + echo "Exiting." + exit 1 elif [[ $2 == "" ]] then - echo "COSMOS installation location argument not provided, exiting." - exit 0 + echo "COSMOS installation location argument not provided." + echo "Usage: \"./install_cosmos_plugin.sh Adamant_assembly_name path_to_COSMOS_directory\"" + echo "Exiting." + exit 1 fi cosmos_install_dir=`realpath ../../../$cosmos_install_name` cosmos_plugin_dir=`realpath $cosmos_install_dir/openc3-cosmos-${adamant_assembly_name//_/-}`