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
Vladislav
eepm
Commits
17477ad5
Commit
17477ad5
authored
Sep 16, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce get_package_type and use it
parent
03702b58
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
16 deletions
+20
-16
epm-changelog
bin/epm-changelog
+5
-3
epm-checkpkg
bin/epm-checkpkg
+1
-2
epm-filelist
bin/epm-filelist
+1
-11
epm-info
bin/epm-info
+1
-0
epm-sh-functions
bin/epm-sh-functions
+12
-0
No files found.
bin/epm-changelog
View file @
17477ad5
...
...
@@ -19,19 +19,21 @@
load_helper epm-query
# TODO: use
__epm_changelog_files
()
{
[
-z
"
$*
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|zypper-rpm|urpm-rpm
)
# TODO: detect every file
case
$(
get_package_type
$1
)
in
rpm
)
docmd_foreach
"rpm -p --changelog"
$@
| less
;;
# apt-dpkg)
#
# ;;
*
)
fatal
"Have no suitable command for
$
PMTYPE
"
fatal
"Have no suitable command for
$
1
"
;;
esac
...
...
bin/epm-checkpkg
View file @
17477ad5
...
...
@@ -19,11 +19,10 @@
check_pkg_integrity
()
{
local
EXT
=
`
echo
"
$1
"
|
sed
-e
"s|.*
\.\(
[a-z0-9]*
\)\$
|
\1
|g"
`
local
PKG
=
"
$1
"
local
RET
case
$
EXT
in
case
$
(
get_package_type
$PKG
)
in
rpm
)
docmd rpm
--checksig
$PKG
;;
...
...
bin/epm-filelist
View file @
17477ad5
...
...
@@ -19,16 +19,6 @@
load_helper epm-query
# TODO: move to appropriate place
_get_package_type
()
{
local
i
for
i
in
deb rpm
;
do
[
"
${
1
/.
$i
/
}
"
!=
"
$1
"
]
&&
echo
$i
&&
return
done
return
0
}
__epm_filelist_file
()
{
local
CMD
...
...
@@ -36,7 +26,7 @@ __epm_filelist_file()
[
-z
"
$*
"
]
&&
return
# TODO: allow a new packages
case
$(
_
get_package_type
$1
)
in
case
$(
get_package_type
$1
)
in
rpm
)
CMD
=
"rpm -qlp"
;;
...
...
bin/epm-info
View file @
17477ad5
...
...
@@ -28,6 +28,7 @@ __epm_info_rpm_low()
is_installed
$pkg_names
&&
docmd rpm
-qi
$pkg_names
&&
return
}
# TODO: separate to _files and _names parts
epm_info
()
{
case
$PMTYPE
in
...
...
bin/epm-sh-functions
View file @
17477ad5
...
...
@@ -242,6 +242,18 @@ assure_exists()
esac
}
# improve
get_package_type
()
{
local
i
for
i
in
deb rpm
;
do
[
"
${
1
/.
$i
/
}
"
!=
"
$1
"
]
&&
echo
$i
&&
return
done
echo
"
$1
"
return
0
}
# print options description from HELPCMD/HELPOPT lines in the code
get_help
()
{
...
...
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