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
bb460b8f
Commit
bb460b8f
authored
Mar 13, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gremote: add -o option for add origin repo
parent
7bb3a2be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
gremote
bin/gremote
+16
-1
No files found.
bin/gremote
View file @
bb460b8f
...
@@ -7,10 +7,11 @@ load_mod git rpm
...
@@ -7,10 +7,11 @@ load_mod git rpm
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"gremote - git remote -v"
echo
"gremote - git remote -v
analogue
"
echo
"Use: gremote"
echo
"Use: gremote"
echo
"Options:"
echo
"Options:"
echo
" -u USER add path to USER package repo"
echo
" -u USER add path to USER package repo"
echo
" -o add path to the origin repo (/srpms or /gears)"
exit
1
exit
1
fi
fi
...
@@ -33,6 +34,20 @@ if [ "$1" = "-u" ] ; then
...
@@ -33,6 +34,20 @@ if [ "$1" = "-u" ] ; then
exit
exit
fi
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
# TODO: add http access support when have no ssh access
docmd git remote add gear
$GIRARHOST
:
$RREPO
exit
fi
test
-r
"
$1
"
&&
fatal
"Do not need any params more"
test
-r
"
$1
"
&&
fatal
"Do not need any params more"
showcmd git remote
-v
showcmd git remote
-v
...
...
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