mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
rankmirrors: properly sort resulting times
- Properly read each sorted line into a new array, instead of breaking on every word. - LC_COLLATE should apply to the sort portion of the pipeline, not the printing. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
a4e0d3e930
commit
7ed54a9940
@ -92,7 +92,8 @@ getfetchurl() {
|
|||||||
|
|
||||||
# This exists to remove the need for a separate interrupt function
|
# This exists to remove the need for a separate interrupt function
|
||||||
finaloutput() {
|
finaloutput() {
|
||||||
IFS=$'\n' sortedarray=( $(LC_COLLATE=C printf "%s\n" "${timesarray[@]}" | sort) )
|
IFS=$'\n' read -r -d '' -a sortedarray < \
|
||||||
|
<(printf '%s\n' "${timesarray[@]}" | LC_COLLATE=C sort)
|
||||||
|
|
||||||
# Final output for mirrorfile
|
# Final output for mirrorfile
|
||||||
numiterator="0"
|
numiterator="0"
|
||||||
|
Loading…
Reference in New Issue
Block a user