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
82688879
Commit
82688879
authored
Apr 08, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit_tarball refactoring
parent
983bed75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
rpmgs
bin/rpmgs
+25
-17
No files found.
bin/rpmgs
View file @
82688879
...
...
@@ -183,33 +183,41 @@ is_gear_sources()
#fatal "missed tar:.gear/gear-sources in $(get_root_git_dir)/.gear/rules"
}
# Args: file dir
# Uses: RPMSOURCEDIR FORCEDOWNLOAD
commit_tarball
()
{
local
TARBALL
=
"
$RPMSOURCEDIR
/
$1
"
local
CURNAME
=
"
$2
"
if
[
-d
"
$RPMSOURCEDIR
"
]
&&
[
-f
"
$TARBALL
"
]
;
then
gear_update_from_tarball
"
$TARBALL
"
"
$CURNAME
"
$FORCEDOWNLOAD
&&
rm
-fv
"
$TARBALL
"
# force commit ever files from .gitignore
docmd git add
-f
"
$CURNAME
"
docmd git commit
-m
"just import
$TARBALL
with rpmgs script"
else
echo
"Skip missed
$TARBALL
tarball commiting"
return
1
fi
return
0
}
# TODO: rewrite for any tarball commit
# $nn $FTB
commit_tarball
()
commit_tarball
s
()
{
#rhas "$GETSOURCE" "ps?://" || GETSOURCE=""
CURNAME
=
$(
get_tardir_from_rules
)
||
fatal
"There is no correct 'tar:' line in gear rules file, needed for commit tarball"
# FIXME:
# use real path for download
is_gear_sources
&&
CURNAME
=
# FIXME: hack to unpack to correct place.
[
$(
basename
`
pwd
`
)
=
".gear"
]
&&
cd
..
# hack: try detect dir for unpacking
test
-d
"
$CURNAME
"
||
CURNAME
=
$(
get_tarballname
"
$spec
"
)
test
-d
"
$CURNAME
"
||
CURNAME
=
$BASENAME
test
-d
"
$CURNAME
"
||
CURNAME
=
$(
get_
root_git_dir
)
/
$(
get_
tarballname
"
$spec
"
)
test
-d
"
$CURNAME
"
||
CURNAME
=
$
(
get_root_git_dir
)
/
$
BASENAME
if
[
-d
"
$RPMSOURCEDIR
"
]
&&
[
-f
"
$RPMSOURCEDIR
/
$FTB
"
]
;
then
gear_update_from_tarball
"
$RPMSOURCEDIR
/
$FTB
"
"
$CURNAME
"
$FORCEDOWNLOAD
rm
-fv
"
$RPMSOURCEDIR
/
$FTB
"
# force commit ever files from .gitignore
docmd git add
-f
"
$CURNAME
"
docmd git commit
-m
"just import
$FTB
with rpmgs script"
else
echo
"Skip missed tarball commiting"
return
1
fi
commit_tarball
$FTB
$CURNAME
}
# update .gear/@name@-postsubmodules if needed
...
...
@@ -433,7 +441,7 @@ do
#docmd git commit -m "merge $FTB with rpmgs script"
elif
is_gear
;
then
# TODO: realize above
commit_tarball
commit_tarball
s
# TODO: make plugins
update_gear_sources
fi
...
...
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