Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/community/pacman-contrib/rankmirror.sh.diff
blob: c7ea00a1227f4485613320ee2874f7a0c712819a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/rankmirrors.sh.in b/src/rankmirrors.sh.in
index 08f7e28..8f9143f 100644
--- a/src/rankmirrors.sh.in
+++ b/src/rankmirrors.sh.in
@@ -79,10 +79,8 @@ getfetchurl() {
 	local replacedurl="${strippedurl//'$arch'/$ARCH}"
 	if [[ ! $TARGETREPO ]]; then
 		replacedurl="${replacedurl//'$repo'/core}"
-		local tmp="${replacedurl%/*}"
-		tmp="${tmp%/*}"
 
-		local reponame="${tmp##*/}"
+		local reponame="${replacedurl##*/}"
 	else
 		replacedurl="${replacedurl//'$repo'/$TARGETREPO}"
 		local reponame="$TARGETREPO"