summaryrefslogtreecommitdiff
path: root/setup-apkrepos.in
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@gmail.com>2010-12-23 20:49:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-28 14:23:04 +0000
commitca99d9e3232d621f6764da6643cc3cc3b828ab0c (patch)
tree6ca09d62bfae5277bb87314686bd06055aa9c122 /setup-apkrepos.in
parentca0e10950a5db60121ac741f0bad28af9bb504b9 (diff)
downloadalpine-conf-ca99d9e3232d621f6764da6643cc3cc3b828ab0c.zip
alpine-conf: add script to add dl-3 internet repos from setup-alpine script
ref # 487
Diffstat (limited to 'setup-apkrepos.in')
-rwxr-xr-xsetup-apkrepos.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
new file mode 100755
index 0000000..1436292
--- /dev/null
+++ b/setup-apkrepos.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+PROGRAM=setup-apkrepos
+PREFIX=
+
+. $PREFIX/lib/libalpine.sh
+
+while true; do
+ printf "Enter repository branch : \n"
+ printf "1 1.10 \n"
+ printf "2 2.0\n"
+ printf "3 2.1\n"
+ printf "4 edge\n"
+ default_read REPO "3"
+ if [ $REPO -gt 0 ] && [ $REPO -lt 5 ]; then
+ break
+ fi
+done
+if [ $REPO == 1 ]; then
+ echo "v1.10 repos selected"
+ echo "http://dl-3.alpinelinux.org/alpine/v1.10/packages/main" >> /etc/apk/repositories
+ apk update
+elif [ $REPO == 2 ]; then
+ echo "v2.0 repos selected";
+ echo "http://dl-3.alpinelinux.org/alpine/v2.0/packages/main" >> /etc/apk/repositories
+ apk update
+elif [ $REPO == 3 ]; then
+ echo "v2.1 repos selected";
+ echo "http://dl-3.alpinelinux.org/alpine/v2.1/packages/main" >> /etc/apk/repositories
+ apk update
+elif [ $REPO == 4 ]; then
+ echo "edge repos selected";
+ echo "http://dl-3.alpinelinux.org/alpine/edge/packages/main" >> /etc/apk/repositories
+ apk update
+fi