Commit f2abddd3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

drop out is_git function, use is_gear instead

parent 489e4329
......@@ -97,7 +97,7 @@ for i in $LISTNAMES
do
# build src.rpm if old way
SPECDIR=`dirname $i`
is_git $SPECDIR || build_rpms_name "$i"
is_gear $SPECDIR || build_rpms_name "$i"
if ! is_alt ; then
if ! build_buildroot ; then
LISTRPMARGS="--buildroot $BUILDROOT $LISTRPMARGS"
......
......@@ -119,7 +119,7 @@ do
subst "s|Patch0:|Patch:|" $i
SPECDIR=`dirname $i`
if ! is_git $SPECDIR && [ -n "$RENAME_SOURCE_TARBALL" ] ; then
if ! is_gear $SPECDIR && [ -n "$RENAME_SOURCE_TARBALL" ] ; then
# Use tar.bz2 for tarball if not git case.
subst "s|\(Source:.*\).tar.gz|\1.tar.bz2|" $i
subst "s|\(Source:.*\).tgz|\1.tar.bz2|" $i
......
......@@ -54,18 +54,6 @@ print_list()
done
}
# Obsoleted:
# TODO: check for .gear, not .git?
is_git()
{
local DIR=$1
[ -n "$DIR" ] && [ -d "$DIR/.git" ] && return 0
[ -d ".git" ] && return 0
# hack for support spec in some subdir
[ -d "../.gear" ] && return 0
return 1
}
is_gear()
{
local DIR=$1
......
......@@ -18,20 +18,22 @@ uni_rpmbuild()
local SPECDIR=`dirname $SPECNAME`
local GEAR=gear
local GEARBUILDREQ=gear-buildreq
if [ -n "$USE_LEGACY_COMPRESSION" ] ; then
# FIXME: do not override -v
ONEPARAM="--define=_source_payload w9.gzdio"
fi
# TODO: add support for git
if [ "$COMMAND" = "buildreq" ] ; then
if is_git $SPECDIR ; then
if is_gear $SPECDIR ; then
$NICE $GEARBUILDREQ --commit -- $@
else
$NICE $COMMAND $@
fi
return
fi
if is_git $SPECDIR ; then
if is_gear $SPECDIR ; then
[ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter"
shift # skip spec name
[ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir"
......
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