Commit 7317b5f5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add girar module with get_girar_repo func

parent 833915c0
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm repl git rpm web repos buildsrpm load_mod rpm repl git rpm web repos buildsrpm girar
# loads repos file and fill SYSNAME and SYSURL arrays # loads repos file and fill SYSNAME and SYSURL arrays
load_systems_list() load_systems_list()
......
#!/bin/bash
# 2013 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# Is allow connect with ssh to the GIRARHOST server?
has_ssh_girar_access()
{
ssh $GIRARHOST help >/dev/null 2>&1
}
# Returns true if repo with path from first arg is exits on the remote GIRARHOST server
is_exist_git_repo()
{
ssh $GIRARHOST ls $1 >/dev/null 2>&1
}
# get gear repo for package name
get_girar_repo()
{
assert_var GIRARHOST
local PKGNAME="$1"
# http://git.altlinux.org/gears/N/NAME.git
local REPOPATH="$(initial_letter $PKGNAME)/$PKGNAME.git"
local RREPO="/gears/$REPOPATH"
if ! is_exist_git_repo $RREPO ; then
RREPO="/srpms/$REPOPATH"
is_exist_git_repo $RREPO || return
fi
echo "$RREPO"
}
...@@ -41,21 +41,6 @@ get_remote_git_list() ...@@ -41,21 +41,6 @@ get_remote_git_list()
done done
} }
# Is allow connect with ssh to the GIRARHOST server?
has_ssh_girar_access()
{
ssh $GIRARHOST help >/dev/null 2>&1
}
# Returns true if repo with path from first arg is exits on the remote GIRARHOST server
is_exist_git_repo()
{
ssh $GIRARHOST ls $1 >/dev/null 2>&1
}
# Check if $1 like git.alt or git.eter, git.something # Check if $1 like git.alt or git.eter, git.something
is_girar_name() is_girar_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