Commit 93f5ea43 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add some comments about spec

parent bc9da0eb
......@@ -22,11 +22,10 @@ fi
#############################
Usage="Usage: $name [-c -p -i -r -R] [spec]"
Usage="Usage: rpmbb [-c -p -i -r -R] [spec]"
function mygetopts()
{
name=${0##*/}
Descr="$name - build binary rpm from spec or from git"
Descr="rpmbb - build binary rpm from spec or from git"
phelp()
{
......
......@@ -126,6 +126,7 @@ get_root_git_dir()
{
local DIR=$(git rev-parse --git-dir 2>/dev/null)/../ || return
readlink -f "$DIR" 2>/dev/null || realpath "$DIR"
# FIXME: 1) can return / with good status 2) no one check status later
}
# TODO: move to separate gear file
......@@ -284,6 +285,8 @@ parse_cmd_pre_spec()
else
local SPEC=$(get_gear_spec)
[ -f "$SPEC" ] && echo "Using autodetected spec $SPEC..."
# it is possible in some command we need only possibility for spec
# || fatal "Run in dir with spec or in gear repo"
parse_cmd_pre $SPEC "$@"
fi
}
......
......@@ -239,7 +239,7 @@ get_gear_spec()
local trySpec
trySpec=$(get_gear_rule_spec)
# check spec in git root dir (by default)
[ -f "$trySpec" ] || trySpec=`echo $(get_root_git_dir)/*.spec`
[ -f "$trySpec" ] || trySpec=`echo $(get_root_git_dir)/*.spec` || return
# check locally only if in gear repo
#is_gear && trySpec=$(echo *.spec)
# printout nothing if can't get spec
......
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