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
de0d7b89
Commit
de0d7b89
authored
Jul 27, 2012
by
Danil Mikhailov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more distr in epm -i, epm -e and add some bugs in epm -e
parent
5e60648b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
57 deletions
+90
-57
epm-install
bin/epm-install
+12
-6
epm-remove
bin/epm-remove
+71
-51
epm-sh-functions
bin/epm-sh-functions
+7
-0
No files found.
bin/epm-install
View file @
de0d7b89
...
...
@@ -52,21 +52,27 @@ epm_install_names()
apt-rpm|apt-dpkg
)
docmd
$SUDO
apt-get
install
$@
return
;;
yum-rpm
)
docmd
$SUDO
yum
install
$@
return
;;
urpm-rpm
)
docmd
$SUDO
urpmi
$@
return
;;
zypper-rpm
)
docmd
$SUDO
zypper
install
$@
return
;;
pkg_add
)
docmd
$SUDO
pkg_add
-r
$@
return
;;
emerge
)
docmd
$SUDO
emerge
-uD
$@
return
;;
pacman
)
docmd
$SUDO
pacman
-S
$@
return
;;
yum-rpm
)
docmd
$SUDO
yum
install
$@
return
;;
zypper-rpm
)
docmd
$SUDO
zypper
install
$@
return
;;
mpkg
)
docmd
$SUDO
mpkg
install
$@
return
;;
pkgtool
)
docmd
$SUDO
installpkg
$@
return
;;
...
...
bin/epm-remove
View file @
de0d7b89
...
...
@@ -23,30 +23,84 @@
# TODO
epm_remove_low
()
{
case
$DISTRNAME
in
"Ubuntu"
|
"Debian"
)
CMD
=
"dpkg -P"
;;
"ALTLinux"
|
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
|
"PCLinux"
|
"Mandriva"
|
"SUSE"
)
CMD
=
"rpm -e"
;;
"ArchLinux"
)
CMD
=
"pacman -R"
;;
"MOPSLinux"
)
CMD
=
"mpkg remove"
;;
"Gentoo"
)
CMD
=
"emerge --unmerge"
;;
[
-z
"
$1
"
]
&&
return
case
$PMTYPE
in
apt-rpm|yum-rpm|zypper-rpm|urpm-rpm
)
docmd
$SUDO
rpm
-e
$@
return
;;
apt-dpkg
)
docmd
$SUDO
dpkg
-P
$@
return
;;
pkg_add
)
docmd
$SUDO
pkg_delete
-r
$@
return
;;
emerge
)
docmd
$SUDO
emerge
-unmerge
$@
return
;;
pacman
)
docmd
$SUDO
pacman
-R
$@
return
;;
mpkg
)
docmd
$SUDO
mpkg remove
$@
return
;;
pkgtool
)
docmd
$SUDO
removepkg
$@
return
;;
*
)
RET
=
1
CMD
=
"echo
\"
Do not known install command for DISTRNAME
$DISTRNAME
\"
"
fatal
"Do not known command for
$PMTYPE
"
;;
esac
}
epm_remove
()
{
[
-n
"
$pkg_file$pkg_names
"
]
||
fatal
"Run remove without names"
epm_remove_names
$pkg_names
||
return
}
epm_remove_names
()
{
[
-z
"
$1
"
]
&&
return
# [ -n "$pkg_filenames" ] || fatal "Run remove without names"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
docmd apt-get remove
--purge
$@
return
;;
urpm-rpm
)
docmd
$SUDO
urpme
$@
return
;;
pkg_add
)
#without dependense
docmd
$SUDO
pkg_delete
$@
return
;;
emerge
)
docmd
$SUDO
emerge
--unmerge
$@
return
;;
pacman
)
docmd
$SUDO
pacman
-R
--noconfirm
$@
return
;;
yum-rpm
)
docmd
$SUDO
yum remove
$@
return
;;
zypper-rpm
)
docmd
$SUDO
zypper remove
$@
return
;;
mpkg
)
docmd
$SUDO
mpkg remove
$@
return
;;
pkgtool
)
docmd
$SUDO
removepkg
$@
return
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
;;
esac
#docmd $SUDO $CMD $pkg_names $pkg_files
}
# TODO
epm_remove_nonint
()
{
...
...
@@ -71,37 +125,3 @@ esac
}
epm_remove
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run remove without names"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
CMD
=
"apt-get remove --purge"
;;
yum-rpm
)
CMD
=
"yum remove"
;;
urpm-rpm
)
CMD
=
"urpme"
;;
zypper-rpm
)
CMD
=
"zypper remove"
;;
emerge
)
CMD
=
"emerge --unmerge"
;;
pacman
)
CMD
=
"pacman -R --noconfirm"
;;
pkgtool
)
CMD
=
"removepkg"
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
;;
esac
docmd
$SUDO
$CMD
$pkg_names
$pkg_files
}
bin/epm-sh-functions
View file @
de0d7b89
...
...
@@ -87,6 +87,13 @@ docmd()
"
$@
"
}
# Print command line and run command line with SUDO
docmds
()
{
showcmd
"
$@
"
"
$SUDO
$@
"
}
filter_strip_spaces
()
{
# possible use just
...
...
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