From b60f2eac850d71e600ae149515fd94f554e267ee Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 18 Aug 2014 17:10:26 -0400 Subject: profile_select_mirror(): New function --- (limited to 'lib') diff --git a/lib/profile.sh b/lib/profile.sh index 6cb8386..40888ea 100644 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -87,6 +87,11 @@ profile_validate_archplat() return 1 } +profile_select_mirror() +{ + "prof_${profile}_select_mirror" +} + profile_feeds() { local arch="${1}" diff --git a/lib/profiles/proteanos.sh b/lib/profiles/proteanos.sh index 0cc6a81..a7946a5 100644 --- a/lib/profiles/proteanos.sh +++ b/lib/profiles/proteanos.sh @@ -68,6 +68,25 @@ prof_proteanos_default_plat() printf 'dev\n' } +prof_proteanos_select_mirror() +{ + local rand= + local mirror= + + rand=$(date '+%S') + rand=$(($rand % 2)) + case ${rand} in + 0) + mirror='http://mirror.gnu.dk/pub/proteanos' + ;; + 1) + mirror='http://mirror.oss.maxcdn.com/proteanos' + ;; + esac + + printf '%s\n' "${mirror}" +} + prof_proteanos_feeds() { local arch="${1}" -- cgit v0.9.1