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 84AFF1EB588 for ; Fri, 7 Jan 2011 23:13:41 +0000 (UTC) Received: by iwn39 with SMTP id 39so17923005iwn.13 for ; Fri, 07 Jan 2011 15:13:41 -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=zoa3OofW8nl7Eul7UM9U21m4TdyZMi4lj63fanP0+IU=; b=rqvdysKEop372oNyC9q+k1+0/C1rxrZlqv28wca3ENIFUViof1uGN8RH0c044UG+Jj 7Cw4FPbeHPeybHq1VcGq5CALzmvjhyxnLrTEYkEu7SN4UAPxDLjptcU4nWdGsxO5QIBz X4ORkb86aPmBgYBYNGYZISiiZ09Rm96J+JRE4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=Xz/6wk0Xk/Zg7RvSNwV8L7iRxH/4ioWXxYLhZBWzy0q3Z9KEcVcYkTMQKHFj4Etaf1 waSGuj77Zk8dHrHY4/Z78R9F973aCHJwFd4QVbPGVIaBKmozWBNOEo0L8uEl1CimIZIZ CQwxscIr2ah73fXr+1MxA24H16J7b8vy5yNP8= Received: by 10.42.177.1 with SMTP id bg1mr1440643icb.185.1294442021046; Fri, 07 Jan 2011 15:13:41 -0800 (PST) Received: from localhost.localdomain (209.250.132.162.tor.pathcom.com [209.250.132.162]) by mx.google.com with ESMTPS id k42sm1037613ick.8.2011.01.07.15.13.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 15:13:40 -0800 (PST) From: Jeff Bilyk To: alpine-devel@lists.alpinelinux.org Cc: Jeff Bilyk Subject: [alpine-devel] [PATCH] setup-apkrepos: remove links dependency Date: Fri, 7 Jan 2011 17:13:17 +0000 Message-Id: <1294420397-2962-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: remove links dependency by using awk, sed, and grep instead of links to parse HTML --- setup-apkrepos.in | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup-apkrepos.in b/setup-apkrepos.in index a989918..c0349b3 100755 --- a/setup-apkrepos.in +++ b/setup-apkrepos.in @@ -24,8 +24,8 @@ else # Retrieve list of versions available on mirror 2.0 and above wget "$MIRROR" > /dev/null 2>&1 availablerepos="" - for version in `links ./index.html -dump | grep "v[2-9]" | awk -F '/' '{print $1}'`; do - +# for version in `links ./index.html -dump | grep "v[2-9]" | awk -F '/' '{print $1}'`; do + for version in `cat index.html | grep 'a href' | grep v[2-9] | awk -F 'a href' '{print $2}' | awk -F '/a' '{print $1}' | awk -F '>' '{print $2}' | sed 's/> /etc/apk/repositories apk update + -- 1.7.3.4 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---