X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by lists.alpinelinux.org (Postfix) with ESMTP id 328771EBFF1 for ; Fri, 24 Dec 2010 02:48:35 +0000 (UTC) Received: by iwn39 with SMTP id 39so6753647iwn.13 for ; Thu, 23 Dec 2010 18:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=gg4ZdCG0Zu2zT6w7BGDdGCs66k7esilrl0w4g0haqjM=; b=C4ZB7b4EN8UhFOUTmWM6+JvbSlp/c1DWGOYV9Y9y2eE0YuOJQMsvHv2UZQmdy7DoNy K/XhFpcA8KKAiUH24Y72PXaoGjF3b3JNg4DxU17YWZAgGge/D1bGBygOGWjmEqZnTuf0 ZMWKrPlMN3FxzHRMiaXCTTolnp6UOarxxBpKM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=OaL2g2hW0SwRcYE1MBKPagDhSgiA4edYPFNOA4QwDKe2fFg6S9YXmkABwG6TsDJ4YR StA7bjQDllUvp3wcXEduslwHZIieMlADYxZeaO3PklYM5COPUS9HLhal8JqgYfARK2Vm 9PKwvm4dsxBBGZCu9HhqQ6/OHVF634DXdqbYM= Received: by 10.42.225.197 with SMTP id it5mr7618358icb.331.1293158914438; Thu, 23 Dec 2010 18:48:34 -0800 (PST) Received: from localhost.localdomain (209.250.132.162.tor.pathcom.com [209.250.132.162]) by mx.google.com with ESMTPS id gy41sm7219575ibb.17.2010.12.23.18.48.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Dec 2010 18:48:33 -0800 (PST) From: Jeff Bilyk To: alpine-devel@lists.alpinelinux.org Cc: Jeff Bilyk Subject: [alpine-devel] [PATCH] alpine-conf: add script to add dl-3 internet repos from setup-alpine script Date: Thu, 23 Dec 2010 20:49:31 +0000 Message-Id: <1293137371-3175-1-git-send-email-jbilyk@gmail.com> X-Mailer: git-send-email 1.7.3.4 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: ref # 487 --- Makefile | 1 + setup-alpine.in | 6 ++++++ setup-apkrepos.in | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 0 deletions(-) create mode 100755 setup-apkrepos.in diff --git a/Makefile b/Makefile index 0046928..c4f9555 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ SBIN_FILES := lbu\ setup-ads\ setup-alpine\ setup-alpine-web\ + setup-apkrepos\ setup-cryptswap\ setup-disk\ setup-dns\ diff --git a/setup-alpine.in b/setup-alpine.in index 8d1aa0f..29bb868 100644 --- a/setup-alpine.in +++ b/setup-alpine.in @@ -67,3 +67,9 @@ _hn=${_hn%%.*} sed -i -e "s/^127\.0\.0\.1.*/127.0.0.1\t${_hn}.${_dn:-$(get_fqdn)} ${_hn} localhost.localdomain localhost/" /etc/hosts +printf "Setup internet apk repositories? [y/N]?" +default_read setuprepos "n" + +if [ $setuprepos == "Y" ] || [ $setuprepos == "y" ]; then + $PREFIX/sbin/setup-apkrepos +fi 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 -- 1.7.3.4 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---