From f16db19dd3fc4299d4381a0897d3ba7a68435de9 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 7 Nov 2023 13:32:56 +0100 Subject: [PATCH 1/2] Fix overwriting/creating watchdog/config.js file while running option 4 on multitoolbox.sh Ensure no `bash: /home/cumulus/watchdog/config.js: cannot overwrite existing file` errors happen while running option 4 on multitoolbox.sh --- multitoolbox.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multitoolbox.sh b/multitoolbox.sh index 147f4a7..789af1c 100644 --- a/multitoolbox.sh +++ b/multitoolbox.sh @@ -1,6 +1,8 @@ #!/bin/bash #disable bash history set +o history +# ensure no `bash: /home/cumulus/watchdog/config.js: cannot overwrite existing file` errors happen while running option 4 +set +o noclobber if ! [[ -z $1 ]]; then if [[ $BRANCH_ALREADY_REFERENCED != '1' ]]; then From c6c81e816f72e0925e0803764f9f2680d1a481d2 Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 23 Dec 2023 18:47:02 +0100 Subject: [PATCH 2/2] Add better comments explaining the bash error --- multitoolbox.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multitoolbox.sh b/multitoolbox.sh index 789af1c..a5acc5b 100644 --- a/multitoolbox.sh +++ b/multitoolbox.sh @@ -1,7 +1,8 @@ #!/bin/bash #disable bash history set +o history -# ensure no `bash: /home/cumulus/watchdog/config.js: cannot overwrite existing file` errors happen while running option 4 +# ensure no `bash: /home/cumulus/config-file-path.extension: cannot overwrite existing file` errors happen +# this error may happen running options 3, 4, 6, 7, 8 and 11 set +o noclobber if ! [[ -z $1 ]]; then