mirror of
https://github.com/fbelavenuto/arpl.git
synced 2025-12-24 14:52:05 +08:00
Improving the updater to support folders
This commit is contained in:
18
img-gen.sh
18
img-gen.sh
@@ -89,8 +89,18 @@ zip -9 "arpl-${VERSION}.img.zip" arpl.img
|
||||
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
|
||||
done
|
||||
yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml | xargs zip -9j "update.zip" sha256sum update-list.yml
|
||||
zip -9j update.zip update-list.yml
|
||||
while read F; do
|
||||
if [ -d "${F}" ]; then
|
||||
FTGZ="`basename "${F}"`.tgz"
|
||||
tar czf "${FTGZ}" -C "${F}" .
|
||||
sha256sum "${FTGZ}" >> sha256sum
|
||||
zip -9j update.zip "${FTGZ}"
|
||||
rm "${FTGZ}"
|
||||
else
|
||||
(cd `dirname ${F}` && sha256sum `basename ${F}`) >> sha256sum
|
||||
zip -9j update.zip "${F}"
|
||||
fi
|
||||
done < <(yq '.replace | explode(.) | to_entries | map([.key])[] | .[]' update-list.yml)
|
||||
zip -9j update.zip sha256sum
|
||||
rm -f sha256sum
|
||||
|
||||
Reference in New Issue
Block a user