mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +02:00
added auto config update
This commit is contained in:
parent
0a00c2961d
commit
3fd2ae7eaa
@ -32,13 +32,6 @@ if [ ! -d "${workdir}" ]; then
|
||||
fi
|
||||
# ----------------------
|
||||
|
||||
|
||||
# read config files
|
||||
installList=$(cat ${updateConfig} | grep -i install-)
|
||||
configureList=$(cat ${updateConfig} | grep -i configure-)
|
||||
buildList=$(cat ${updateConfig} | grep -i build-)
|
||||
# -----------------------
|
||||
|
||||
echo -e "Updating repository\n"
|
||||
|
||||
# config repository
|
||||
@ -75,6 +68,13 @@ fi
|
||||
git rev-parse --verify HEAD | sudo tee $previusCommitFile
|
||||
# ------------
|
||||
|
||||
|
||||
# read config files
|
||||
installList=$(cat ${updateConfig} | grep -i install-)
|
||||
configureList=$(cat ${updateConfig} | grep -i configure-)
|
||||
buildList=$(cat ${updateConfig} | grep -i build-)
|
||||
# -----------------------
|
||||
|
||||
echo -e "Starting installation and configs auto update\n"
|
||||
|
||||
echo "Kaido: "
|
||||
@ -87,6 +87,7 @@ echo "current commit: ${currentCommit_config}"
|
||||
|
||||
|
||||
|
||||
|
||||
# auto update builds
|
||||
|
||||
# echo -e "Checking if custom images need to be built\n"
|
||||
@ -97,6 +98,7 @@ echo "current commit: ${currentCommit_config}"
|
||||
# $buildScript $name
|
||||
# fi
|
||||
# done
|
||||
# ---------------------------
|
||||
|
||||
# auto update installations
|
||||
echo -e "Checking if installations need to be updated\n"
|
||||
@ -114,14 +116,14 @@ echo -e "Installations updated\n"
|
||||
# ---------------------------
|
||||
|
||||
# auto update configs
|
||||
# echo -e "Checking if configs need to be updated\n"
|
||||
# for val in $configureList; do
|
||||
# name=${val:10}
|
||||
# if git diff --name-only $previusCommit $currentCommit configuration | grep -qi $name ; then
|
||||
# echo -e "Updating ${name} configuration\n"
|
||||
# $configureScript $name
|
||||
# fi
|
||||
# done
|
||||
echo -e "Checking if configs need to be updated\n"
|
||||
for val in $configureList; do
|
||||
name=${val:6}
|
||||
if $(git -C "$root" diff --name-only $previusCommit_config $currentCommit_config "$confdir/containers/$name/config" | grep -qi $name) ; then
|
||||
echo -e "Updating ${name} configuration\n"
|
||||
$configureScript $name
|
||||
fi
|
||||
done
|
||||
# ---------------------------
|
||||
echo -e "Configurations Updated\n"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user