~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[alpine-devel] [PATCH] setup-apkrepos: remove links dependency

Jeff Bilyk <jbilyk@gmail.com>
Details
Message ID
<1294420397-2962-1-git-send-email-jbilyk@gmail.com>
Sender timestamp
1294420397
DKIM signature
missing
Download raw message
Patch: +3 -2
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/<//'`; do
			availablerepos="$availablerepos $version"
		done
		rm index.html
@@ -42,3 +42,4 @@ fi

echo "${MIRROR}${repo}/main" >> /etc/apk/repositories
apk update

-- 
1.7.3.4



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)