Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
7bb3a2be
Commit
7bb3a2be
authored
Mar 13, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move some funcs to functions/git
parent
82fecc93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
rpmgp
bin/rpmgp
+3
-13
git
share/eterbuild/functions/git
+14
-0
No files found.
bin/rpmgp
View file @
7bb3a2be
...
...
@@ -258,27 +258,17 @@ get_all_remote_branches()
docmd git checkout sisyphus
||
docmd git checkout master
||
docmd git checkout
$CURRENTBRANCH
}
has_ssh_access
()
{
ssh
$GIRARHOST
help
>
/dev/null 2>&1
}
git_clone
()
{
local
RREPO
=
"
$1
"
# Test if ssh access is available
if
[
-z
"
$PUBLICACCESS
"
]
&&
has_ssh_access
;
then
if
[
-z
"
$PUBLICACCESS
"
]
&&
has_ssh_
girar_
access
;
then
docmd git clone
$GIRARHOST
:
$RREPO
else
docmd git clone
$GIRARURL
/
$RREPO
fi
}
exist_git_repo
()
{
ssh
$GIRARHOST
ls
$1
>
/dev/null 2>&1
}
# clone remote git
if
[
-n
"
$CLONEGIT
"
]
;
then
# http://git.altlinux.org/gears/N/NAME.git
...
...
@@ -300,13 +290,13 @@ if [ -n "$CLONEGIT" ] ; then
fi
else
[
-z
"
$PUBLICACCESS
"
]
||
fatal
"Can't remote clone via public access"
if
exist_git_repo
$RREPO
;
then
if
is_
exist_git_repo
$RREPO
;
then
echo
"Remote clone from
$RREPO
..."
docmd ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
else
# http://git.altlinux.org/srpms/N/NAME.git
RREPO
=
"/srpms/
$REPOPATH
"
if
exist_git_repo
$RREPO
;
then
if
is_
exist_git_repo
$RREPO
;
then
echo
"Remote clone from
$RREPO
..."
docmd ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
else
...
...
share/eterbuild/functions/git
View file @
7bb3a2be
...
...
@@ -42,6 +42,20 @@ get_remote_git_list()
}
# 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
is_girar_name
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment