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
05d85c8c
Commit
05d85c8c
authored
Apr 24, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play.d/common.sh: fix --force to override the same version
parent
6afd5b20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
common.sh
play.d/common.sh
+9
-6
No files found.
play.d/common.sh
View file @
05d85c8c
#!/bin/sh
# kind of hack: inheritance --force from main epm
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--force"
&&
force
=
"--force"
fatal
()
{
echo
"FATAL:
$*
"
>
&2
...
...
@@ -119,28 +122,29 @@ case "$1" in
exit
fi
# latestpkgver <= $pkgver
if
[
"
$(
epm print compare package version
$latestpkgver
$pkgver
)
"
!=
"1"
]
;
then
if
[
-z
"
$force
"
]
&&
[
"
$(
epm print compare package version
$latestpkgver
$pkgver
)
"
!=
"1"
]
;
then
echo
"Latest available version of
$PKGNAME
:
$latestpkgver
. Installed version:
$pkgver
."
exit
fi
# kind of hack
if
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--force"
;
then
if
[
-n
"
$force
"
]
;
then
echo
"Updating
$PKGNAME
from
$pkgver
to latest available version ..."
else
echo
"Updating
$PKGNAME
from
$pkgver
to
$latestpkgver
version ..."
VERSION
=
"
$latestpkgver
"
fi
fi
# pass to run play code
;;
"--run"
)
# just pass
# just pass
to run play code
;;
*
)
fatal
"Unknown command '
$1
'. Use this script only via epm play."
;;
esac
# --update/--run
# support direct run the script
if
[
-x
"../bin/epm"
]
;
then
...
...
@@ -185,8 +189,7 @@ is_repacked_package()
epm status
--installed
$pkg
||
return
0
# kind of hack
echo
"
$EPM_OPTIONS
"
|
grep
-q
--
"--force"
&&
return
[
-n
"
$force
"
]
&&
return
0
if
epm status
--original
$pkg
;
then
echo
"Package
$pkg
is already installed from ALT repository."
...
...
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