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
3f486672
Commit
3f486672
authored
Jul 18, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce PMTYPE (apt-rpm, apt-dpkg) and use it
parent
7ce6c057
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
22 deletions
+54
-22
epm
bin/epm
+5
-0
epm-sh-functions
bin/epm-sh-functions
+30
-0
epm-update
bin/epm-update
+5
-6
epm-upgrade
bin/epm-upgrade
+14
-16
No files found.
bin/epm
View file @
3f486672
...
...
@@ -81,6 +81,9 @@ for opt in "$@" ; do
-e
|
remove
)
epm_cmd
=
remove
;;
dist-upgrade|upgrade
)
epm_cmd
=
upgrade
;;
-s
|
search
)
epm_cmd
=
search
;;
...
...
@@ -117,6 +120,8 @@ DISTRVENDOR=distr_vendor
[
-n
"
$DISTRVERSION
"
]
||
DISTRVERSION
=
$(
$DISTRVENDOR
-v
)
set_target_pkg_env
set_pm_type
[
-n
"
$epm_cmd
"
]
||
fatal
"Run without command"
epm_cmd_file
=
$(
dirname
$0
)
/epm-
$epm_cmd
...
...
bin/epm-sh-functions
View file @
3f486672
...
...
@@ -67,3 +67,33 @@ fatal()
fi
exit
1
}
# FIXME: detect if not recognized
set_pm_type
()
{
local
CMD
case
$DISTRNAME
in
"ALTLinux"
|
"PCLinux"
)
CMD
=
"apt-rpm"
;;
"FreeBSD"
)
CMD
=
"pkg_add"
;;
"Ubuntu"
|
"Debian"
)
CMD
=
"apt-dpkg"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
CMD
=
"yum-rpm"
;;
"Mandriva"
)
CMD
=
"urpm-rpm"
;;
"SUSE"
)
CMD
=
"zypper-rpm"
;;
*
)
fatal
"Do not known command for DISTRNAME
$DISTRNAME
"
;;
esac
PMTYPE
=
$CMD
}
bin/epm-update
View file @
3f486672
...
...
@@ -22,13 +22,12 @@
epm_update
()
{
#docmd $CMD $pkg_files $pkg_names
case
$DISTRNAME
in
"ALTLinux"
)
exit
0
case
$PMTYPE
in
"apt-rpm"
)
apt-get update
||
exit
apt-get
-f
install
||
exit
;;
"
Ubuntu"
|
"Debian"
|
"PCLinux
"
)
"
apt-dpkg
"
)
apt-get update
||
exit
apt-get
-f
install
||
exit
apt-get autoremove
...
...
bin/epm-upgrade
View file @
3f486672
...
...
@@ -18,31 +18,29 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# copied from korinf/tools/run-script/scripts/search
epm_search
()
epm_upgrade
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run search without names
"
[
-n
"
$pkg_filenames
"
]
&&
fatal
"No need any args for upgrade command
"
case
$DISTRNAME
in
"ALTLinux"
|
"Ubuntu"
|
"Debian"
|
"PCLinux"
)
echo
"Run command for upgrade packages"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
# FIXME: apt-get update before
CMD
=
"apt-get dist-upgrade"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
yum-rpm
)
CMD
=
"yum update"
;;
# "Mandriva"
)
# CMD="urpmf
"
#
;;
"SUSE"
)
urpm-rpm
)
CMD
=
"urpmi --auto-update
"
;;
zypper-rpm
)
CMD
=
"zypper update"
;;
*
)
RET
=
1
CMD
=
"echo
\"
Do not known install command for DISTRNAME
$DISTRNAME
\"
"
fatal
"Do not known command for
$PMTYPE
"
;;
esac
docmd
$CMD
$pkg_filenames
esac
docmd
$CMD
}
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