From 291c049919185852724ef4584bdf2c059152e18e Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 18 Jul 2024 15:24:22 -0400 Subject: [PATCH 1/2] iiab-update: Try "bash -e" (exit on error) and "cp -u" (--update) --- scripts/iiab-update | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/iiab-update b/scripts/iiab-update index 8f8ba2f94..48a4f90ac 100755 --- a/scripts/iiab-update +++ b/scripts/iiab-update @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/bash -e +# "-e" tries to exit right away on error. # Upgrade IIAB core software (apt updates, Ansible, Admin Console, etc). @@ -40,7 +41,7 @@ if [[ $1 == "-f" || $1 == "--fast" ]]; then # Otherwise ./runrole does it below! (as Ansible runs roles/0-init) cd scripts echo -e "\n\e[4mNow running: cp iiab-update iiab-summary iiab-diagnostics /usr/bin\e[0m\n" - cp iiab-update iiab-summary iiab-diagnostics /usr/bin + cp -u iiab-update iiab-summary iiab-diagnostics /usr/bin fi if [[ $1 == "-f" || $1 == "--fast" ]]; then From 732ddf80111ed6f47883fcc9a7798f8b55c14088 Mon Sep 17 00:00:00 2001 From: A Holt Date: Thu, 18 Jul 2024 15:28:07 -0400 Subject: [PATCH 2/2] iiab-update: Clarify "cp -u" in live output too --- scripts/iiab-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/iiab-update b/scripts/iiab-update index 48a4f90ac..eca416d60 100755 --- a/scripts/iiab-update +++ b/scripts/iiab-update @@ -40,7 +40,7 @@ git pull https://github.com/iiab/iiab --no-rebase --no-edit if [[ $1 == "-f" || $1 == "--fast" ]]; then # Otherwise ./runrole does it below! (as Ansible runs roles/0-init) cd scripts - echo -e "\n\e[4mNow running: cp iiab-update iiab-summary iiab-diagnostics /usr/bin\e[0m\n" + echo -e "\n\e[4mNow running: cp -u iiab-update iiab-summary iiab-diagnostics /usr/bin\e[0m\n" cp -u iiab-update iiab-summary iiab-diagnostics /usr/bin fi