FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-23-2010, 02:42 AM
Andres P
 
Default 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>
---
scripts/rankmirrors.sh.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/rankmirrors.sh.in b/scripts/rankmirrors.sh.in
index 283fb46..6170a22 100644
--- a/scripts/rankmirrors.sh.in
+++ b/scripts/rankmirrors.sh.in
@@ -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#*= }"
--
1.7.1
 

Thread Tools




All times are GMT. The time now is 06:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org