Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
48002901
Commit
48002901
authored
Apr 26, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-download: allow install a few packages by mask (improve heuristic)
parent
e9fe67e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
epm-download
bin/epm-download
+17
-2
No files found.
bin/epm-download
View file @
48002901
...
@@ -65,6 +65,20 @@ __use_url_install()
...
@@ -65,6 +65,20 @@ __use_url_install()
return
0
return
0
}
}
# some heuristic to detect if we need download only latest package
__check_if_wildcard_downloading
()
{
mask
=
"
$(
basename
"
$1
"
)
"
is_wildcard
"
$mask
"
||
return
1
local
fn
fn
=
"
$(
docmd eget
--list
"
$url
"
| xargs
-n1
basename
)
"
local
wf
=
"
$(
epm print shortname from filename
$fn
|
wc
-l
)
"
local
ws
=
"
$(
epm print shortname from filename
$fn
|
sort
-u
|
wc
-l
)
"
# not the same package of various versions
[
"
$wf
"
=
"
$ws
"
]
}
# for download before install / checking
# for download before install / checking
__download_pkg_urls
()
__download_pkg_urls
()
{
{
...
@@ -76,9 +90,10 @@ __download_pkg_urls()
...
@@ -76,9 +90,10 @@ __download_pkg_urls()
remove_on_exit
$tmppkg
remove_on_exit
$tmppkg
chmod
$verbose
a+rX
$tmppkg
chmod
$verbose
a+rX
$tmppkg
cd
$tmppkg
||
fatal
cd
$tmppkg
||
fatal
local
latest
=
'--latest'
local
latest
=
'--latest'
# hack: download all if mask is *.something
__check_if_wildcard_downloading
"
$url
"
&&
latest
=
''
basename
"
$url
"
|
grep
-q
"^
\*\.
"
&&
latest
=
''
# download packages
# download packages
if
docmd eget
$latest
"
$url
"
;
then
if
docmd eget
$latest
"
$url
"
;
then
local
i
local
i
...
...
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