mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-14 21:35:02 -05:00
rankmirrors: fix bogus pacman configuration parsing
Valid pacman configuration files do not have to start with a hash for that line to be a comment, neither do directives need to be in column 0. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
2222e9f8df
commit
226c137245
@ -184,9 +184,9 @@ fi
|
|||||||
|
|
||||||
timesarray=()
|
timesarray=()
|
||||||
for line in "${linearray[@]}"; do
|
for line in "${linearray[@]}"; do
|
||||||
if [[ $line =~ ^# ]]; then
|
if [[ $line =~ ^[[:space:]]*# ]]; then
|
||||||
[[ $TIMESONLY ]] || echo $line
|
[[ $TIMESONLY ]] || echo $line
|
||||||
elif [[ $line =~ ^Server ]]; then
|
elif [[ $line =~ ^[[:space:]]*Server ]]; then
|
||||||
|
|
||||||
# Getting values and times and such
|
# Getting values and times and such
|
||||||
server="${line#*= }"
|
server="${line#*= }"
|
||||||
|
Loading…
Reference in New Issue
Block a user