From 3306d90f7944c347ef6dd6aed6bfb55f0a68b9c2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Aug 2014 20:43:43 -0400 Subject: profile_validate_archplat(): New function --- (limited to 'lib/profile.sh') diff --git a/lib/profile.sh b/lib/profile.sh index ee6e556..aaeb317 100644 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -60,6 +60,27 @@ profile_detect_arch() "prof_${profile}_detect_arch" } +profile_validate_archplat() +{ + local arch="${1}" + local plat="${2}" + local prof_arch= + local prof_plat= + + while read -r prof_arch prof_plat; do + [ "x${prof_arch}" = 'x' ] && continue + if [ "x${arch}" = "x${prof_arch}" ]; then + if [ "x${plat}" = "x${prof_plat}" ]; then + return 0 + fi + fi + done <<-EOF + $(eval "printf '%s\n' \"\${prof_${profile}_archplats}\"") + EOF + + return 1 +} + profile_feeds() { local arch="${1}" -- cgit v0.9.1