Commit ec3a38f3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

move is_git from config to common, add is_gear function instead

obsoleted is_git
parent 10407621
......@@ -58,6 +58,34 @@ is_alt()
return $?
}
# 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
[ -n "$DIR" ] && [ -d "$DIR/.gear" ] && return 0
[ -d ".gear" ] && return 0
# compat
[ -n "$DIR" ] && [ -r "$DIR/.gear-rules" ] && return 0
[ -r ".gear-rules" ] && return 0
# hack for support spec in some subdir
[ -d "../.gear" ] && return 0
return 1
}
if [ "$UID" = "0" ] ; then
fatal "It is strict recommended do not use these scripts as root"
fi
......
......@@ -21,17 +21,6 @@ OURTMPDIR=$TMPDIR
NICE="nice"
RPMBUILD=rpmbuild
# 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
}
RPMDIR="$HOME/RPM"
[ -n "$APTCONFBASE" ] || APTCONFBASE=$ETERBUILDETC/apt/apt.conf
......
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