summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/profile.sh5
-rw-r--r--lib/profiles/proteanos.sh19
2 files changed, 24 insertions, 0 deletions
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}"