Split lib/general.sh

This commit is contained in:
hzy
2022-10-03 10:52:43 +08:00
committed by Ricardo Pardini
parent 14f4260bf9
commit d4c8dff4f0
18 changed files with 1793 additions and 1875 deletions

View File

@@ -0,0 +1,16 @@
# get_package_list_hash
#
# returns md5 hash for current package list and rootfs cache version
get_package_list_hash()
{
local package_arr exclude_arr
local list_content
read -ra package_arr <<< "${DEBOOTSTRAP_LIST} ${PACKAGE_LIST}"
read -ra exclude_arr <<< "${PACKAGE_LIST_EXCLUDE}"
(
printf "%s\n" "${package_arr[@]}"
printf -- "-%s\n" "${exclude_arr[@]}"
) | sort -u | md5sum | cut -d' ' -f 1
}