From cd010e0053f8dbe32421e65bd12dae501f879978 Mon Sep 17 00:00:00 2001 From: Richard Creasey - AI4Y <69941625+creas002@users.noreply.github.com> Date: Tue, 30 Jul 2024 07:15:51 -0400 Subject: [PATCH] Since verifcation tool is added to install script, conditionally execute from upgrade script --- ansible/roles/common/files/rn2_upgrade.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ansible/roles/common/files/rn2_upgrade.sh b/ansible/roles/common/files/rn2_upgrade.sh index 000bbb0f..e72e9b8f 100644 --- a/ansible/roles/common/files/rn2_upgrade.sh +++ b/ansible/roles/common/files/rn2_upgrade.sh @@ -129,11 +129,16 @@ echo "#####################################################" cd ${HOME}/raspberry-noaa-v2 ./install_and_upgrade.sh -echo "#####################################################" -echo "# Execute Verification Tool" -echo "#####################################################" +# Determine if verification tool was in the repo cloned if [[ -f ${HOME}/raspberry-noaa-v2/scripts/tools/verification_tool/verification.sh ]]; then - ${HOME}/raspberry-noaa-v2/scripts/tools/verification_tool/verification.sh quick + # Confirm if install_and_upgrade.sh script code already executed it or not + vFound=$(cat ${HOME}/raspberry-noaa-v2/install_and_upgrade.sh | grep verification.sh | wc -l) + if [[ ${vFOUND} -eq 0 ]]; then + echo "#####################################################" + echo "# Execute Verification Tool" + echo "#####################################################" + ${HOME}/raspberry-noaa-v2/scripts/tools/verification_tool/verification.sh quick + fi else echo "The installed GitHub REPO has not been updated with the Verification Tool, skipping..." fi