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
7920e3d8
Commit
7920e3d8
authored
Jun 28, 2024
by
Boris Yumankulov
Committed by
Vitaly Lipatov
Jul 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add --latest argument (eterbug #17408)
parent
4d679291
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
epm-play
bin/epm-play
+6
-0
common.sh
play.d/common.sh
+13
-9
No files found.
bin/epm-play
View file @
7920e3d8
...
...
@@ -248,6 +248,7 @@ Options:
<app> - install <app>
--remove <app> - uninstall <app>
--update [<app>|all] - update <app> (or all installed apps) if there is new version
--latest <app> - forced to install the latest version of the application
--list - list all installed apps
--list-all - list all available apps
--list-scripts - list all available scripts
...
...
@@ -533,6 +534,11 @@ case "$1" in
__epm_play_list
$prsdir
exit
;;
--latest
)
shift
export
latest
=
"true"
;;
-
*
)
fatal
"Unknown option
$1
"
;;
...
...
play.d/common.sh
View file @
7920e3d8
...
...
@@ -3,6 +3,8 @@
# kind of hack: inheritance --force from main epm
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--force"
&&
force
=
"--force"
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--auto"
&&
auto
=
"--auto"
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--latest"
&&
latest
=
"true"
fatal
()
{
...
...
@@ -339,17 +341,19 @@ check_for_product_update()
exit
fi
# latestpkgver <= $pkgver
if
[
-z
"
$force
"
]
&&
[
"
$(
epm print compare package version
$latestpkgver
$pkgver
)
"
!=
"1"
]
;
then
if
[
"
$latestpkgver
"
=
"
$pkgver
"
]
;
then
echo
"Latest available version of
$PKGNAME
$latestpkgver
is already installed."
else
echo
"Latest available version of
$PKGNAME
:
$latestpkgver
, but you have a newer version installed:
$pkgver
."
if
[
-z
"
$force
"
]
||
[
-z
"
$latest
"
]
;
then
if
[
"
$(
epm print compare package version
$latestpkgver
$pkgver
)
"
!=
"1"
]
;
then
if
[
"
$latestpkgver
"
=
"
$pkgver
"
]
;
then
echo
"Latest available version of
$PKGNAME
$latestpkgver
is already installed."
else
echo
"Latest available version of
$PKGNAME
:
$latestpkgver
, but you have a newer version installed:
$pkgver
."
fi
exit
fi
exit
fi
#echo "Updating $PKGNAME from $pkgver to the latest available version (equal to $latestpkgver or newer) ..."
if
[
-n
"
$force
"
]
;
then
if
[
-n
"
$force
"
]
||
[
-z
"
$latest
"
]
;
then
echo
"Updating
$PKGNAME
from
$pkgver
to latest available version ..."
else
echo
"Updating
$PKGNAME
from
$pkgver
to
$latestpkgver
version ..."
...
...
@@ -442,12 +446,12 @@ is_supported_arch "$(epm print info -a)" || fatal "Only '$SUPPORTEDARCHES' archi
# skip install if there is package installed not via epm play
is_repacked_packages
$REPOPKGNAME
||
exit
0
if
[
-z
"
$VERSION
"
]
&&
[
-z
"
$force
"
]
&&
[
-n
"
$EGET_IPFS_DB
"
]
;
then
if
[
-z
"
$VERSION
"
]
&&
[
-z
"
$force
"
]
&&
[
-n
"
$EGET_IPFS_DB
"
]
&&
[
-z
"
$latest
"
]
;
then
# IPFS is using, use known version
VERSION
=
"
$(
get_latest_version
$PKGNAME
)
"
fi
if
[
-z
"
$VERSION
"
]
&&
[
-z
"
$force
"
]
;
then
if
[
-z
"
$VERSION
"
]
&&
[
-z
"
$force
"
]
&&
[
-z
"
$latest
"
]
;
then
# by default use latest known version to install
VERSION
=
"
$(
get_latest_version
$PKGNAME
)
"
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