From 83a4faf47314a1d8b4b0091be24514bd7cfafd26 Mon Sep 17 00:00:00 2001 From: Snogard Date: Thu, 6 Mar 2025 16:51:37 +0100 Subject: [PATCH] removed upgrade from update script --- src/commands/update.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/commands/update.sh b/src/commands/update.sh index c142e58..eb5202c 100755 --- a/src/commands/update.sh +++ b/src/commands/update.sh @@ -6,8 +6,8 @@ source /opt/kaido/src/libs/bash/lib.sh # variables root="/opt/kaido" -workdir="$HOME/.cache/kaido/update" -confdir="$KAIDO_CONFIG_FOLDER" +sysConfigDir="/etc/kaido" +configDir="$KAIDO_CONFIG_FOLDER" # ---------- # kaido repository @@ -15,8 +15,18 @@ cd $root sudo git reset --hard sudo git pull -#TODO: remove in the future -kaido upgrade +if [ -d "$sysConfigDir" ]; then + cd /etc/kadio + sudo git reset --hard + sugo git pull +fi + +if [ ! "$configDir" = "$sysConfigDir" ]; then + cd $configDir + git reset --hard + git pull +fi + echo "WARNING: the update process is being split into two commands. kaido update: to download the latest container defitions and kaido versions