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
65b48c0b
You need to sign in or sign up before continuing.
Commit
65b48c0b
authored
Oct 02, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: if tarball is not tar, try download it firstly
parent
b16e320e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
rpmgs
bin/rpmgs
+14
-6
No files found.
bin/rpmgs
View file @
65b48c0b
...
@@ -69,14 +69,21 @@ download_any_tarball()
...
@@ -69,14 +69,21 @@ download_any_tarball()
{
{
local
GETSOURCE
=
"
$1
"
local
GETSOURCE
=
"
$1
"
local
TARGET
=
"
$2
"
local
TARGET
=
"
$2
"
local
ext
local
FORMATS
=
"tar.xz tar.bz2 tar.gz zip tgz 7z tbz2 tbz rar tar"
local
FORMATS
=
"tar.xz tar.bz2 tar.gz zip tgz 7z tbz2 tbz rar tar"
local
BASESOURCE
=
"
$GETSOURCE
"
local
BASESOURCE
=
"
$GETSOURCE
"
# drop any ext
for
ext
in
$FORMATS
;
do
local
ORIGEXT
=
$(
rhas
"
$BASESOURCE
"
"
\.
"
&&
echo
"
$BASESOURCE
"
|
sed
-e
"s|.*
\.
||"
)
BASESOURCE
=
$(
echo
"
$BASESOURCE
"
|
sed
-e
"s|
\.
$ext$|
|g"
)
[
-n
"
$ORIGEXT
"
]
||
fatal
"Have no idea how to load files without extension"
done
# try download with some ext
# first try download with original extension (exclude for tar)
if
[
"
$ORIGEXT
"
!=
"tar"
]
;
then
FORMATS
=
"
$ORIGEXT
$(
estrlist exclude
"
$ORIGEXT
"
"
$FORMATS
"
)
"
fi
BASESOURCE
=
$(
echo
"
$BASESOURCE
"
|
sed
-e
"s|
\.
$ORIGEXT$|
|g"
)
local
ext
# try download by exts list
for
ext
in
$FORMATS
;
do
for
ext
in
$FORMATS
;
do
[
-n
"
$FORCEDOWNLOAD
"
]
&&
docmd
rm
-f
"
$BASESOURCE
.
$ext
"
[
-n
"
$FORCEDOWNLOAD
"
]
&&
docmd
rm
-f
"
$BASESOURCE
.
$ext
"
download_url
"
$BASESOURCE
.
$ext
"
||
continue
download_url
"
$BASESOURCE
.
$ext
"
||
continue
...
@@ -105,6 +112,7 @@ function source_ext()
...
@@ -105,6 +112,7 @@ function source_ext()
GETSOURCEEXT
=
$(
eval_spec
"
$TMPSPEC
"
| get_var
"Summary"
)
GETSOURCEEXT
=
$(
eval_spec
"
$TMPSPEC
"
| get_var
"Summary"
)
rm
-f
"
$TMPSPEC
"
rm
-f
"
$TMPSPEC
"
fi
fi
echo
"
$GETSOURCEEXT
"
echo
"
$GETSOURCEEXT
"
test
-n
"
$GETSOURCEEXT
"
test
-n
"
$GETSOURCEEXT
"
}
}
...
...
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