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
Nurlan
eepm
Commits
1608e3a0
Commit
1608e3a0
authored
Jul 22, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --skip-installed for skip aready installed packages
parent
4ec54dad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
5 deletions
+38
-5
epm
bin/epm
+4
-0
epm-install
bin/epm-install
+34
-5
No files found.
bin/epm
View file @
1608e3a0
...
...
@@ -58,6 +58,7 @@ Descr="epm - EPM package manager"
verbose
=
quiet
=
non_interactive
=
skip_installed
=
epm_cmd
=
pkg_files
=
pkg_names
=
...
...
@@ -94,6 +95,9 @@ for opt in "$@" ; do
--verbose
)
# HELPOPT: verbose mode
verbose
=
1
;;
--skip-installed
)
# HELPOPT: skip already install during install
skip_installed
=
1
;;
--quiet
)
# HELPOPT: quiet mode (do not print commands before exec)
quiet
=
1
;;
...
...
bin/epm-install
View file @
1608e3a0
...
...
@@ -18,6 +18,32 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# TODO: use when run install with epm --skip-installed install
filter_out_installed_packages
()
{
[
-z
"
$skip_installed
"
]
&&
cat
&&
return
# TODO: use this more effectively way
#for i in $(cat) ; do
# rpm -q $i >/dev/null && continue
# echo $i
#done |
case
$PKGFORMAT
in
"rpm"
)
LANG
=
C
LC_ALL
=
C xargs
-n1
rpm
-q
2>&1 |
grep
'is not installed'
|
sed
-e
's|^.*package \(.*\) is not installed.*|\1|g'
;;
"deb"
)
LANG
=
C
LC_ALL
=
C xargs
-n1
dpkg
-L
2>&1 |
grep
'is not installed.'
|
sed
-e
's|^Package .\(.*\). is not installed.*|\1|g'
;;
*
)
cat
;;
esac
|
sed
-e
"s|rpm-build-altlinux-compat||g"
| filter_strip_spaces
}
# copied from etersoft-build-utils/share/eterbuild/functions/rpmpkg
epm_install_names
()
{
...
...
@@ -99,13 +125,16 @@ epm_install()
{
[
-n
"
$pkg_files$pkg_names
"
]
||
fatal
"Run install without packages"
local
names
=
$(
echo
$pkg_names
| filter_out_installed_packages
)
local
files
=
$(
echo
$pkg_files
| filter_out_installed_packages
)
[
-z
"
$files$names
"
]
&&
echo
"Skip empty install list"
&&
return
2
if
[
-n
"
$non_interactive
"
]
;
then
epm_ni_install_names
$
pkg_
names
||
return
epm_ni_install_names
$names
||
return
else
epm_install_names
$
pkg_
names
||
return
epm_install_names
$names
||
return
fi
epm_install_files
$pkg_files
epm_install_files
$files
}
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