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 12-04-2008, 12:23 PM
Allan McRae
 
Default contirb/pactree: fix option parsing

The option parsing was catching any "-d" in an arguement so packages
with this in their name did not work.

Also removed commented code line that appears to be inserted during
testing

Signed-off-by: Allan McRae <allan@archlinux.org>
---
contrib/pactree | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/contrib/pactree b/contrib/pactree
index d9fa8b3..df53671 100755
--- a/contrib/pactree
+++ b/contrib/pactree
@@ -208,11 +208,10 @@ for (( n=0 ; n < $len_options ; n++ )); do
continue
fi

- if [[ "${options[$n]}" =~ -d[[:digit:]]* || "${options[$n]}" == "--depth" ]]; then
+ if [[ "${options[$n]}" =~ -d[[:digit:]]+ || "${options[$n]}" == "--depth" ]]; then
if [[ "${options[$n]#-d}" =~ [[:digit:]]+ ]]; then
max_depth="${options[$n]#-d}"
elif [[ ${options[$((n+1))]} =~ [[:digit:]]+ ]]; then
-# if [ ${options[$((n+1))]} -eq ${options[$((n+1))]} 2>/dev/null ]; then
max_depth="${options[$((n+1))]}"
unset options[$((n+1))]
((++n))
--
1.6.0.4

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 12-04-2008, 01:11 PM
"Dan McGee"
 
Default contirb/pactree: fix option parsing

On Thu, Dec 4, 2008 at 7:23 AM, Allan McRae <allan@archlinux.org> wrote:
> The option parsing was catching any "-d" in an arguement so packages
> with this in their name did not work.
>
> Also removed commented code line that appears to be inserted during
> testing
>
> Signed-off-by: Allan McRae <allan@archlinux.org>
> ---

Thanks. Applied to my maint branch.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 05:39 AM.

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