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
57d31869
Commit
57d31869
authored
Oct 15, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add --second-latest support
parent
781e41ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
tools_eget
bin/tools_eget
+11
-0
No files found.
bin/tools_eget
View file @
57d31869
...
...
@@ -237,6 +237,12 @@ if [ "$1" = "--latest" ] ; then
shift
fi
SECONDLATEST
=
''
if
[
"
$1
"
=
"--second-latest"
]
;
then
SECONDLATEST
=
"
$1
"
shift
fi
fatal
()
{
echo
"
$*
"
>
&2
...
...
@@ -253,6 +259,10 @@ filter_glob()
filter_order
()
{
if
[
-n
"
$SECONDLATEST
"
]
;
then
sort
-V
|
tail
-n2
|
head
-n1
return
fi
[
-z
"
$LATEST
"
]
&&
cat
&&
return
sort
-V
|
tail
-n1
}
...
...
@@ -287,6 +297,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
echo
" --list - print files from url with mask"
echo
" --check - check if URL is accessible (returns HTTP 200 OK)"
echo
" --latest - print only latest version of a file"
echo
" --second-latest - print only second to latest version of a file"
echo
echo
"eget supports --list and download for https://github.com/owner/project urls"
echo
...
...
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