SPEC=$1
if [ $SPEC = "--" ]; then
if [ "$#" -lt 2 ]; then
- echo "Usage: rpm --bcond SPEC"
+ echo "Usage: rpmbuild --bcond SPEC"
exit 1
fi
SPEC=$2
fi
if [ ! -f $SPEC ]; then
- echo "rpm: $SPEC: no such file"
+ echo "rpmbuild: $SPEC: no such file"
exit 1
fi
print substr($0, RSTART, RLENGTH)
}
/^%bcond_with/ && chlog == 0 {
- match($0, /bcond_with(out)?[ ]+[_a-zA-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`