From c60ffe98ed09b18c9e15e7e4a7c9fc602267037b Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 28 Jul 2007 19:47:06 +0000 Subject: [PATCH] * changed lib/sde-config/pkgsel2awk.sh again, because it still crash on debian git-svn-id: svn://svn.opensde.net/opensde/opensde/trunk@21858 10447126-35f2-4685-b0cf-6dd780d3921f --- lib/sde-config/pkgsel2awk.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sde-config/pkgsel2awk.sh b/lib/sde-config/pkgsel2awk.sh index 2f33f00..aa29627 100755 --- a/lib/sde-config/pkgsel2awk.sh +++ b/lib/sde-config/pkgsel2awk.sh @@ -57,10 +57,13 @@ pkgsel_parse() { -e 's,[^a-zA-Z0-9_/\*+\-\[\]],,g' \ -e 's,[/\.\+],\\\\&,g' \ -e 's,\*,[^/]*,g' )" + + [ -z "$address" ] || address="$address &&" + if [ $neg -eq 0 ]; then - address="$address${address:+ && }( \$5 ~ \"^${pattern}\$\" )" + address="$address( \$5 ~ \"^${pattern}\$\" )" else - address="$address${address:+ && }( \$5 !~ \"^${pattern}\$\" )" + address="$address( \$5 !~ \"^${pattern}\$\" )" fi done < <( echo "$patternlist" | tr '\t ' '\n\n' ) echo "{ if ( $address ) { $action; } }"