summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-01-16 04:59:21 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-01-16 05:42:04 (EST)
commit8ab731bb1d411fd5a11eb8278ad344f7f8bd47c6 (patch)
treeab1c9f8078e2c4eff2cbeaeb30eb4c0a03930e07
parent854d8403909e7deb0e945ca4723d63ef34357192 (diff)
profile_installer_type(): New function
-rw-r--r--src/profile.sh6
-rw-r--r--src/profile/proteanos.sh21
2 files changed, 24 insertions, 3 deletions
diff --git a/src/profile.sh b/src/profile.sh
index 0af1935..744ddef 100644
--- a/src/profile.sh
+++ b/src/profile.sh
@@ -70,9 +70,9 @@ profile_detect()
}
for func in normalize_suite detect_arch default_plat select_mirror \
- validate_archplat opkg_state_dir opkg_conf_file feeds \
- get_cert_url get_root_key dep_fields include_pkg get_fstab \
- file_systems_mounted bind_mount bind_umount \
+ 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 bind_mount bind_umount \
configure_system_native configure_system_foreign find_kernel \
make_initramfs; do
eval "profile_${func}() { \"prof_\${_profile}_${func}\" \"\${@}\"; }"
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}"