Commit 2883d79c authored by Vitaly Lipatov's avatar Vitaly Lipatov

parse_cmd_pre_spec(): add spec detection inside hasher

parent 99ead57c
...@@ -448,6 +448,15 @@ parse_cmd_pre_spec() ...@@ -448,6 +448,15 @@ parse_cmd_pre_spec()
{ {
[ "$1" = "--help" ] && mygetopts -h [ "$1" = "--help" ] && mygetopts -h
if [ -z "$1" ] ; then
local SPEC="$(echo /usr/src/RPM/SPECS/*.spec)"
if [ -f "$SPEC" ] ; then
info "Using spec $SPEC inside hasher..."
parse_cmd_pre "$SPEC"
return
fi
fi
# hack for check spec or src.rpm presence in command line: skip spec detecting # hack for check spec or src.rpm presence in command line: skip spec detecting
if rhas "$*" "\.(spec|src\.rpm)" ; then if rhas "$*" "\.(spec|src\.rpm)" ; then
parse_cmd_pre "$@" parse_cmd_pre "$@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment