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
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
Show 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 @@
...
@@ -19,19 +19,21 @@
load_helper epm-query
load_helper epm-query
# TODO: use
__epm_changelog_files
()
__epm_changelog_files
()
{
{
[
-z
"
$*
"
]
&&
return
[
-z
"
$*
"
]
&&
return
case
$PMTYPE
in
# TODO: detect every file
apt-rpm|yum-rpm|zypper-rpm|urpm-rpm
)
case
$(
get_package_type
$1
)
in
rpm
)
docmd_foreach
"rpm -p --changelog"
$@
| less
docmd_foreach
"rpm -p --changelog"
$@
| less
;;
;;
# apt-dpkg)
# apt-dpkg)
#
#
# ;;
# ;;
*
)
*
)
fatal
"Have no suitable command for
$
PMTYPE
"
fatal
"Have no suitable command for
$
1
"
;;
;;
esac
esac
...
...
bin/epm-checkpkg
View file @
17477ad5
...
@@ -19,11 +19,10 @@
...
@@ -19,11 +19,10 @@
check_pkg_integrity
()
check_pkg_integrity
()
{
{
local
EXT
=
`
echo
"
$1
"
|
sed
-e
"s|.*
\.\(
[a-z0-9]*
\)\$
|
\1
|g"
`
local
PKG
=
"
$1
"
local
PKG
=
"
$1
"
local
RET
local
RET
case
$
EXT
in
case
$
(
get_package_type
$PKG
)
in
rpm
)
rpm
)
docmd rpm
--checksig
$PKG
docmd rpm
--checksig
$PKG
;;
;;
...
...
bin/epm-filelist
View file @
17477ad5
...
@@ -19,16 +19,6 @@
...
@@ -19,16 +19,6 @@
load_helper epm-query
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
()
__epm_filelist_file
()
{
{
local
CMD
local
CMD
...
@@ -36,7 +26,7 @@ __epm_filelist_file()
...
@@ -36,7 +26,7 @@ __epm_filelist_file()
[
-z
"
$*
"
]
&&
return
[
-z
"
$*
"
]
&&
return
# TODO: allow a new packages
# TODO: allow a new packages
case
$(
_
get_package_type
$1
)
in
case
$(
get_package_type
$1
)
in
rpm
)
rpm
)
CMD
=
"rpm -qlp"
CMD
=
"rpm -qlp"
;;
;;
...
...
bin/epm-info
View file @
17477ad5
...
@@ -28,6 +28,7 @@ __epm_info_rpm_low()
...
@@ -28,6 +28,7 @@ __epm_info_rpm_low()
is_installed
$pkg_names
&&
docmd rpm
-qi
$pkg_names
&&
return
is_installed
$pkg_names
&&
docmd rpm
-qi
$pkg_names
&&
return
}
}
# TODO: separate to _files and _names parts
epm_info
()
epm_info
()
{
{
case
$PMTYPE
in
case
$PMTYPE
in
...
...
bin/epm-sh-functions
View file @
17477ad5
...
@@ -242,6 +242,18 @@ assure_exists()
...
@@ -242,6 +242,18 @@ assure_exists()
esac
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
# print options description from HELPCMD/HELPOPT lines in the code
get_help
()
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