fix git diff checking on config folder

This commit is contained in:
Snogard 2023-07-22 14:48:01 +02:00
parent ec03aa451e
commit 68b0be9059

View File

@ -33,8 +33,6 @@ fi
# ----------------------
# read config files
installList=$(cat ${updateConfig} | grep -i install-)
configureList=$(cat ${updateConfig} | grep -i configure-)
@ -105,9 +103,9 @@ echo -e "Checking if installations need to be updated\n"
for val in $installList; do
name=${val:8}
# TODO support parameters
if $(git diff --name-only $previusCommit $currentCommit src/commands/install | grep -qi $name) || \
( [ -f "$confdir/containers/$name/envs.sh" ] && $(git diff --name-only $previusCommit_config $currentCommit_config "$confdir/containers/$name/envs.sh" | grep -qi "envs\.sh" ) ) || \
[ ! $(git diff --name-only $previusCommit_config $currentCommit_config $confdir/containers/$name/secrets) -z ] ; then
if $(git -C "$root" diff --name-only $previusCommit $currentCommit src/commands/install | grep -qi $name) || \
( [ -f "$confdir/containers/$name/envs.sh" ] && $(git -C "$confdir" diff --name-only $previusCommit_config $currentCommit_config "$confdir/containers/$name/envs.sh" | grep -qi "envs\.sh" ) ) || \
[ ! $(git -C "$confdir" diff --name-only $previusCommit_config $currentCommit_config "$confdir/containers/$name/secrets") -z ] ; then
echo -e "Updating ${name} installation\n"
$installScript $name
fi