Testing new update method

This commit is contained in:
Fabio Belavenuto 2022-10-26 13:39:41 -03:00
parent 04455518e2
commit 1a1afd86dc
3 changed files with 7 additions and 3 deletions

View File

@ -97,7 +97,7 @@ jobs:
zip -9 "arpl-${{ steps.build.outputs.VERSION }}.vmdk-flat.zip" arpl.vmdk arpl-flat.vmdk
sha256sum update-list.yml > sha256sum
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | while read F; do
(cd `dirname ${F}` && sha256sum `basename ${F}` > sha256sum)
(cd `dirname ${F}` && sha256sum `basename ${F}`) >> sha256sum
done
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | xargs zip -9j "update-${{ steps.build.outputs.VERSION }}.zip" sha256sum update-list.yml

View File

@ -915,6 +915,10 @@ function updateMenu() {
while IFS="=" read KEY VALUE; do
mv /tmp/`basename "${KEY}"` "${VALUE}"
done < <(readConfigMap "replace" "/tmp/update-list.yml")
while read F; do
[ -f "${F}" ] && rm -f "${F}"
[ -d "${F}" ] && rm -Rf "${F}"
done < <(readConfigArray "remove" "/tmp/update-list.yml")
dialog --backtitle "`backtitle`" --title "Update arpl" --aspect 18 \
--yesno "Arpl updated with success to ${TAG}!\nReboot?" 0 0
[ $? -ne 0 ] && continue

View File

@ -89,7 +89,7 @@ zip -9 "arpl-${VERSION}.vmdk-dyn.zip" arpl-dyn.vmdk
zip -9 "arpl-${VERSION}.vmdk-flat.zip" arpl.vmdk arpl-flat.vmdk
sha256sum update-list.yml > sha256sum
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | while read F; do
(cd `dirname ${F}` && sha256sum `basename ${F}` > sha256sum)
(cd `dirname ${F}` && sha256sum `basename ${F}`) >> sha256sum
done
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | xargs zip -9D "update-${VERSION}.zip" sha256sum update-list.yml
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | xargs zip -9j "update-${VERSION}.zip" sha256sum update-list.yml
rm -f sha256sum