summaryrefslogtreecommitdiffstats
path: root/contrib/rankmirrors.sh.in
diff options
context:
space:
mode:
authorJason St. John <jstjohn@purdue.edu>2013-11-15 05:06:24 +0100
committerAllan McRae <allan@archlinux.org>2013-12-15 11:09:37 +0100
commit9749fb033c8794e8ac4b931678659aa2b79ae1b1 (patch)
tree471e00ba3b510d323d8358b3054dbc90fda13e76 /contrib/rankmirrors.sh.in
parentae2c9bba5a0de58454814c5fa438cf1db52707ae (diff)
downloadpacman-9749fb033c8794e8ac4b931678659aa2b79ae1b1.tar.gz
pacman-9749fb033c8794e8ac4b931678659aa2b79ae1b1.tar.xz
Fix misspellings and some grammar issues in output of some pacman contrib scripts
Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'contrib/rankmirrors.sh.in')
-rw-r--r--contrib/rankmirrors.sh.in41
1 files changed, 29 insertions, 12 deletions
diff --git a/contrib/rankmirrors.sh.in b/contrib/rankmirrors.sh.in
index 0c4c7345..453ebfbe 100644
--- a/contrib/rankmirrors.sh.in
+++ b/contrib/rankmirrors.sh.in
@@ -130,8 +130,15 @@ while [[ $1 ]]; do
version) version ;;
times) TIMESONLY=1 ; shift ;;
verbose) VERBOSE=1 ; shift ;;
- url) CHECKURL=1; [[ $2 ]] || err "Must specify url."; URL="$2"; shift 2;;
- repo) [[ $2 ]] || err "Must specify repo name."; TARGETREPO="$2"; shift 2;;
+ url)
+ CHECKURL=1;
+ [[ $2 ]] || err "Must specify URL.";
+ URL="$2";
+ shift 2;;
+ repo)
+ [[ $2 ]] || err "Must specify repository name.";
+ TARGETREPO="$2";
+ shift 2;;
*) err "'$1' is an invalid argument."
esac
elif [[ ${1:0:1} = - ]]; then
@@ -148,9 +155,19 @@ while [[ $1 ]]; do
h) usage ;;
t) TIMESONLY=1 ;;
v) VERBOSE=1 ;;
- u) CHECKURL=1; [[ $2 ]] || err "Must specify url."; URL="$2"; snum=2;;
- r) [[ $2 ]] || err "Must specify repo name."; TARGETREPO="$2"; snum=2;;
- n) [[ $2 ]] || err "Must specify number." ; NUM="$2" ; snum=2;;
+ u)
+ CHECKURL=1;
+ [[ $2 ]] || err "Must specify URL.";
+ URL="$2";
+ snum=2;;
+ r)
+ [[ $2 ]] || err "Must specify repository name.";
+ TARGETREPO="$2";
+ snum=2;;
+ n)
+ [[ $2 ]] || err "Must specify number.";
+ NUM="$2";
+ snum=2;;
*) err "'$1' is an invalid argument." ;;
esac
done
@@ -168,22 +185,22 @@ done
# Some sanity checks
[[ $NUM ]] || NUM=0
-[[ $FILE && $CHECKURL ]] && err "Cannot specify a url and mirrorfile."
-[[ $FILE || $CHECKURL || $STDIN ]] || err "Must specify url, mirrorfile, or stdin."
+[[ $FILE && $CHECKURL ]] && err "Cannot specify a URL and mirrorfile."
+[[ $FILE || $CHECKURL || $STDIN ]] || err "Must specify URL, mirrorfile, or stdin."
-# Single url handling
+# Single URL handling
if [[ $CHECKURL ]]; then
url="$(getfetchurl "$URL")"
- [[ $url = fail ]] && err "url '$URL' is malformed."
+ [[ $url = fail ]] && err "URL '$URL' is malformed."
[[ $VERBOSE ]] && echo "Testing $url..."
time=$(gettime "$url")
echo "$URL : $time"
exit 0
fi
-# Get url results from mirrorfile, fill up the array, and so on
+# Get URL results from mirrorfile, fill up the array, and so on
if [[ $TIMESONLY ]]; then
- echo "Querying servers, this may take some time..."
+ echo "Querying servers. This may take some time..."
elif [[ $FILE ]]; then
echo "# Server list generated by rankmirrors on $(date +%Y-%m-%d)"
fi
@@ -198,7 +215,7 @@ for line in "${linearray[@]}"; do
server="${line#*= }"
server="${server%%#*}"
url="$(getfetchurl "$server")"
- [[ $url = fail ]] && err "url '$URL' is malformed."
+ [[ $url = fail ]] && err "URL '$URL' is malformed."
time=$(gettime "$url")
timesarray+=("$time $server")