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
e4e55248
Commit
e4e55248
authored
Oct 16, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gremote, rpmgp: use get_girar_repo func
parent
7317b5f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
23 deletions
+8
-23
gremote
bin/gremote
+2
-8
rpmgp
bin/rpmgp
+6
-15
No files found.
bin/gremote
View file @
e4e55248
...
...
@@ -2,8 +2,7 @@
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod git rpm
#load_mod rpm tarball alt git web buildsrpm
load_mod rpm git girar
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
...
...
@@ -37,12 +36,7 @@ fi
if
[
"
$1
"
=
"-o"
]
;
then
# http://git.altlinux.org/gears/N/NAME.git
PKGNAME
=
$(
get_gear_name
)
REPOPATH
=
"
$(
initial_letter
$PKGNAME
)
/
$PKGNAME
.git"
RREPO
=
"/gears/
$REPOPATH
"
if
!
is_exist_git_repo
$RREPO
;
then
RREPO
=
"/srpms/
$REPOPATH
"
is_exist_git_repo
$RREPO
||
fatal
"Can't detect origin repo for
$PKGNAME
"
fi
RREPO
=
$(
get_girar_repo
$PKGNAME
)
||
fatal
"Can't detect origin repo for
$PKGNAME
"
# TODO: add http access support when have no ssh access
docmd git remote add gear
$GIRARHOST
:
$RREPO
exit
...
...
bin/rpmgp
View file @
e4e55248
...
...
@@ -301,7 +301,7 @@ if [ -n "$CLONEGIT" ] ; then
# http://git.altlinux.org/gears/N/NAME.git
REPOPATH
=
"
$(
initial_letter
$PKGNAME
)
/
$PKGNAME
.git"
RREPO
=
"/gears/
$REPOPATH
"
# FIXME: use get_girar_repo?
# TODO: check appropriate repo with exist_git_repo
if
[
-z
"
$MIGRATEGIRAR
"
]
;
then
if
!
git_clone
$RREPO
;
then
...
...
@@ -317,25 +317,16 @@ if [ -n "$CLONEGIT" ] ; then
fi
else
[
-z
"
$PUBLICACCESS
"
]
||
fatal
"Can't remote clone via public access"
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
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
fatal
"
$PKGNAME
does not exists in
$GIRARHOST
:/gears, nor in
$GIRARHOST
:/srpms. Can't clone."
fi
fi
RREPO
=
$(
get_girar_repo
$PKGNAME
)
||
fatal
"
$PKGNAME
does not exists in
$GIRARHOST
:/gears, nor in
$GIRARHOST
:/srpms. Can't clone."
echo
"Remote clone from
$RREPO
..."
docmd ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
docmd git clone
$GIRARHOST
:packages/
$PKGNAME
.git
if
cd
$PKGNAME
;
then
# add remotes
docmd git remote rename origin
$GIRARHOST
&&
docmd
git remote add gear
$GIRARHOST
:
$RREPO
docmd git remote rename origin
$GIRARHOST
&&
docmd
$ETERBUILDBIN
/gremote
$GIRARHOST
-o
cd
-
>
/dev/null
#elif is_exist_remote_repo origin && ! is_exist_remote_repo gears ; then
# git remote -v | grep -q "^origin.*/gears/" && docmd git remote rename origin gears
...
...
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