From a1db555af744d55ba4528098bfef5b0880a3e3ba Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Tue, 10 Sep 2024 04:41:35 +0200 Subject: [PATCH] [arkdep] Only untar update.sh if ARKDEP_ROOT unset --- arkdep | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arkdep b/arkdep index 8edc57c..450c146 100755 --- a/arkdep +++ b/arkdep @@ -1198,13 +1198,15 @@ deploy () { done # Check if there is an update script available - if tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ ./${data[0]}-update.sh 2> /dev/null && [[ ! -n $ARKDEP_ROOT ]]; then - printf '\e[1;34m-->\e[0m\e[1m Running update script\e[0m\n' - # Run the migration script if provided - (source $arkdep_dir/cache/${data[0]}-update.sh) + if [[ ! -n $ARKDEP_ROOT ]]; then + if tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ ./${data[0]}-update.sh 2> /dev/null; then + printf '\e[1;34m-->\e[0m\e[1m Running update script\e[0m\n' + # Run the migration script if provided + (source $arkdep_dir/cache/${data[0]}-update.sh) - printf '\e[1;34m-->\e[0m\e[1m Removing update script\e[0m\n' - rm $arkdep_dir/cache/${data[0]}-update.sh + printf '\e[1;34m-->\e[0m\e[1m Removing update script\e[0m\n' + rm $arkdep_dir/cache/${data[0]}-update.sh + fi fi # Image deployment finished, allow for interupts again