diff options
author | Dan McGee <dan@archlinux.org> | 2010-06-24 08:32:33 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-06-24 08:32:33 -0500 |
commit | 630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b (patch) | |
tree | 3b043d1a1d22e527e112c40a7d11130ef69f5727 /scripts/rankmirrors.sh.in | |
parent | 71330a431040377ae9a37989fcfd43cee7596194 (diff) | |
parent | 6f4f9c1b66ed859b3679d70e15c003ab4907b823 (diff) | |
download | pacman-630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b.tar.xz |
Merge branch 'maint'
Diffstat (limited to 'scripts/rankmirrors.sh.in')
-rw-r--r-- | scripts/rankmirrors.sh.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in index 9b4e973a..b0dc1ab7 100644 --- a/scripts/rankmirrors.sh.in +++ b/scripts/rankmirrors.sh.in @@ -49,7 +49,7 @@ version() { } err() { - echo "$1" + echo "$1" >&2 exit 1 } @@ -70,15 +70,15 @@ ARCH="$(uname -m)" getfetchurl() { local strippedurl="${1%/}" - local replacedurl="${replacedurl//'$arch'/$ARCH}" + local replacedurl="${strippedurl//'$arch'/$ARCH}" if [[ ! $TARGETREPO ]]; then - replacedurl="${strippedurl//'$repo'/core}" + replacedurl="${replacedurl//'$repo'/core}" local tmp="${replacedurl%/*}" tmp="${tmp%/*}" local reponame="${tmp##*/}" else - replacedurl="${strippedurl//'$repo'/$TARGETREPO}" + replacedurl="${replacedurl//'$repo'/$TARGETREPO}" local reponame="$TARGETREPO" fi @@ -184,9 +184,9 @@ fi timesarray=() for line in "${linearray[@]}"; do - if [[ $line =~ ^# ]]; then + if [[ $line =~ ^[[:space:]]*# ]]; then [[ $TIMESONLY ]] || echo $line - elif [[ $line =~ ^Server ]]; then + elif [[ $line =~ ^[[:space:]]*Server ]]; then # Getting values and times and such server="${line#*= }" |