summaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-setup-apkrepos-avoid-double-in-url.patch
blob: 704a2a95feb39e6c351ee5bb4c135f43ca51a9f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From c23761a2c183f30c22a1811ba2e13b4c933f744f Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 3 May 2011 06:04:38 +0000
Subject: [PATCH 1/2] setup-apkrepos: avoid double // in url

---
 setup-apkrepos.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 21eb802..d4e8d80 100755
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -102,8 +102,8 @@ get_alpine_release() {
 
 add_mirror() {
 	local mirror="$1"
-	echo "$mirror/$release/main" >> $APKREPOS_PATH
-	echo "#$mirror/$release/testing" >> $APKREPOS_PATH
+	echo "${mirror%/}/${release}/main" >> $APKREPOS_PATH
+	echo "#${mirror%/}/${release}/testing" >> $APKREPOS_PATH
 	echo "" >> $APKREPOS_PATH
 	echo "Added mirror $(get_hostname_from_url $mirror)"
 }
-- 
1.7.4.5