From 561dc43e5b4b303232669903f9db1f318eb476a3 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 16 Jan 2021 10:27:00 -0500 Subject: profile_plat_arches(): New function --- diff --git a/src/profile.sh b/src/profile.sh index 582166c..ba803f5 100644 --- a/src/profile.sh +++ b/src/profile.sh @@ -69,7 +69,7 @@ profile_detect() return 1 } -for func in normalize_suite detect_arch default_plat select_mirror \ +for func in normalize_suite detect_arch default_plat plat_arches select_mirror \ prepare_install installer_type validate_archplat \ opkg_state_dir opkg_conf_file feeds get_cert_url get_root_key \ dep_fields include_pkg get_fstab file_systems_mounted \ diff --git a/src/profile/proteanos.sh b/src/profile/proteanos.sh index f322adf..f44de08 100644 --- a/src/profile/proteanos.sh +++ b/src/profile/proteanos.sh @@ -70,6 +70,9 @@ _prof_proteanos_platforms_paragraph() platform="${_prof_proteanos_platforms_platform}" archplat="$(printf '%s' "${platform}" | tr -c '[a-z0-9/]' '_')" + eval "_prof_proteanos_archplat_arches_${archplat#*/}=$(: \ + )\"\${_prof_proteanos_archplat_arches_${archplat#*/}-}$(: \ + )\${platform%/*}\"" archplat="${archplat%/*}__${archplat#*/}" _prof_proteanos_platforms="${_prof_proteanos_platforms}${platform} " @@ -133,6 +136,14 @@ prof_proteanos_default_plat() printf 'dev\n' } +prof_proteanos_plat_arches() +{ + local plat="${1}" + shift 1 + + eval "printf '%s\\n' \${_prof_proteanos_archplat_arches_${plat}}" +} + prof_proteanos_select_mirror() { local mirrors= -- cgit v0.9.1