Commit 102c638f authored by Vitaly Lipatov's avatar Vitaly Lipatov

realize get_repo_name via giter print name

parent 30faab0b
......@@ -22,7 +22,7 @@ BuildArchitectures: noarch
# Buildreqs note: C compiler is required by rpm-build; we do not require C++ here
BuildRequires: rpm-build-compat >= %altcompat_ver
Requires: giter >= 0.3
Requires: giter >= 0.4
Requires: eepm >= 1.5.0
Requires: erc >= 0.5
......
#!/bin/bash
# 2008 Etersoft www.etersoft.ru
# 2008, 2014 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Author: Denis Smirnov <mithraen@altlinux.ru>
# Public domain
......@@ -31,26 +31,12 @@ get_current_branch()
git branch | grep '^\*' | sed 's/^..//' | tr -d "\n"
}
# get name from current remote repository name
get_remote_repo_name()
{
local branch remote url basename
branch=$(get_current_branch)
[ -n "$branch" ] || return
remote=$(git config --get branch.$branch.remote)
url=$(git config --get remote.$remote.url)
[ -n "$url" ] || return
basename=$(basename "$url" .git)
echo "$basename"
[ -n "$basename" ]
}
get_repo_name()
{
# try use remote repo name firstly
get_remote_repo_name && return
giter print name
# use repo dir name in other way
get_gear_name && return
#get_gear_name && return
# get name from spec
#build_rpms_name "$LISTNAMES"
#PROJECTNAME=$(echo $BASENAME | filter_gear_name)
......
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