From 8ab731bb1d411fd5a11eb8278ad344f7f8bd47c6 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 16 Jan 2021 04:59:21 -0500 Subject: profile_installer_type(): New function --- (limited to 'src/profile') diff --git a/src/profile/proteanos.sh b/src/profile/proteanos.sh index 8a2cf91..0f34f5d 100644 --- a/src/profile/proteanos.sh +++ b/src/profile/proteanos.sh @@ -162,6 +162,27 @@ prof_proteanos_select_mirror() printf '%s\n' "${mirrors}" | sed -n "${mirror_num}p" } +prof_proteanos_installer_type() +{ + local mirror="${1}" + local suite="${2}" + local arch="${3}" + local plat="${4}" + shift 4 + local arch_clean= + local plat_clean= + local archplat= + local installer_type= + + _prof_proteanos_get_platforms "${mirror}" "${suite}" + arch_clean="$(printf '%s' "${arch}" | tr -c '[a-z0-9/]' '_')" + plat_clean="$(printf '%s' "${plat}" | tr -c '[a-z0-9/]' '_')" + archplat="${arch_clean}__${plat_clean}" + eval "installer_type=\"\${_prof_proteanos_archplat_type_${archplat}}\"" + + return "${installer_type}" +} + prof_proteanos_validate_archplat() { local mirror="${1}" -- cgit v0.9.1