X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-find-spec-bcond;h=40ad15495ed80ba83e674d8bfbf32c90aa20daf3;hb=a2eb41d9ccc1fbf2b7b7c7105fa653063fc1cd3f;hp=82343531a0e501dde88922ad9880ece3e9c3277c;hpb=35a6f2f9dca1677b8c72ff667199b47bb1cf4791;p=packages%2Frpm.git diff --git a/rpm-find-spec-bcond b/rpm-find-spec-bcond index 8234353..40ad154 100644 --- a/rpm-find-spec-bcond +++ b/rpm-find-spec-bcond @@ -23,10 +23,16 @@ 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) - }' $SPEC | sort -u` + } + /^%bcond_with/ && chlog == 0 { + match($0, /bcond_with(out)?[ ]+[_a-zA-Z0-9]+/); + bcond = substr($0, RSTART +5 , RLENGTH -5); + gsub(/ /,"_",bcond); + print bcond + }' $SPEC | sort -u` for c in $bconds; do echo -n "$c" @@ -51,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