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
f812d6fa
Commit
f812d6fa
authored
Apr 04, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbsh: add git bundle support
parent
b834075c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
rpmbsh
bin/rpmbsh
+2
-0
common
share/eterbuild/functions/common
+18
-0
No files found.
bin/rpmbsh
View file @
f812d6fa
...
...
@@ -124,6 +124,8 @@ for i in $LISTBUILT ; do
estrlist has
$i
$LISTNAMES
||
rm
-fv
$i
done
[
-n
"
$EREMOVETMPGIT
"
]
&&
rm
-rf
"
$EREMOVETMPGIT
"
date
echo
"-------------------------------"
...
...
share/eterbuild/functions/common
View file @
f812d6fa
...
...
@@ -457,6 +457,24 @@ parse_cmd_pre_spec()
fi
fi
# Git bundle support
if
rhas
"
$1
"
"
\.
bundle$"
&&
file
"
$1
"
|
grep
-q
"Git bundle"
;
then
local
abspath
=
"
$(
realpath
"
$1
"
)
"
local
name
=
"
$(
basename
"
$1
"
.bundle |
sed
-e
's| .*||'
)
"
local
tdir
=
"
$(
mktemp
-d
)
"
&&
mkdir
$tdir
/
$name
/
||
fatal
local
HEAD
=
"
$(
git bundle list-heads
"
$abspath
"
|
grep
" HEAD$"
|
tail
-n1
|
sed
-e
's| HEAD.*||'
)
"
[
-n
"
$HEAD
"
]
||
fatal
"can't get HEAD commit from
$1
"
cd
"
$tdir
/
$name
/"
&&
git init
||
fatal
git bundle unbundle
"
$abspath
"
||
{
rm
-rf
$tdir
/
;
fatal
;
}
git checkout
-b
master
$HEAD
cd
-
>
/dev/null
local
SPEC
=
$(
get_gear_spec
$tdir
/
$name
)
shift
parse_cmd_pre
"
$SPEC
"
"
$@
"
EREMOVETMPGIT
=
"
$tdir
"
return
fi
# hack for check spec or src.rpm presence in command line: skip spec detecting
if
rhas
"
$*
"
"
\.
(spec|src
\.
rpm)"
;
then
parse_cmd_pre
"
$@
"
...
...
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