mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04: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=()
|
||||
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#*= }"
|
||||
|
Loading…
Reference in New Issue
Block a user