X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-find-spec-bcond;h=200e1b407d3b3b68c047817b916ff24bd8ee652a;hb=7d8492bb7945538d97a1c36b815c07379f711ea1;hp=b6490753928065730f583ff62cb9589519b876ea;hpb=bc17cac98ca9fbd072a5b114aee4af8552802706;p=packages%2Frpm.git diff --git a/rpm-find-spec-bcond b/rpm-find-spec-bcond index b649075..200e1b4 100644 --- a/rpm-find-spec-bcond +++ b/rpm-find-spec-bcond @@ -23,14 +23,14 @@ fi bconds=`awk -F"\n" 'BEGIN { chlog=0 } /^%changelog/ { chlog=1 } - /_with(out)?_[_a-z0-9]+/ && chlog == 0 { - match($0, /_with(out)?_[_a-z0-9]+/); + /_with(out)?_[_a-zA-Z0-9]+/ && chlog == 0 { + match($0, /_with(out)?_[_a-zA-Z0-9]+/); print substr($0, RSTART, RLENGTH) } /^%bcond_with/ && chlog == 0 { - match($0, /bcond_with(out)?[ ]+[_a-z0-9]+/); + match($0, /bcond_with(out)?[ \t]+[_a-zA-Z0-9]+/); bcond = substr($0, RSTART +5 , RLENGTH -5); - gsub(/ /,"_",bcond); + gsub(/[ \t]+/,"_",bcond); print bcond }' $SPEC | sort -u` @@ -57,7 +57,7 @@ for bcond in $bconds; do } } END { print val }" $SPEC`; - if [ $isset -eq 1 ]; then + if [ x"$isset" = x"1" ]; then echo "WARN: $bcond defined in spec"; fi done