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
bb13cc4e
Commit
bb13cc4e
authored
Feb 12, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update packed files to 1.1.9
parent
37611952
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
11 deletions
+105
-11
epm.sh
packed/epm.sh
+95
-8
serv.sh
packed/serv.sh
+10
-3
No files found.
packed/epm.sh
View file @
bb13cc4e
...
@@ -18,8 +18,10 @@
...
@@ -18,8 +18,10 @@
#
#
PROGDIR
=
$(
dirname
$0
)
PROGDIR
=
$(
dirname
$0
)
[
"
$PROGDIR
"
=
"."
]
&&
PROGDIR
=
$(
pwd
)
# will replaced to /usr/share/eepm during install
# will replaced to /usr/share/eepm during install
SHAREDIR
=
$
(
dirname
$0
)
SHAREDIR
=
$
PROGDIR
load_helper
()
load_helper
()
{
{
...
@@ -146,6 +148,10 @@ strip_spaces()
...
@@ -146,6 +148,10 @@ strip_spaces()
echo
"
$*
"
| filter_strip_spaces
echo
"
$*
"
| filter_strip_spaces
}
}
epm
()
{
$PROGDIR
/epm
$@
}
fatal
()
fatal
()
{
{
...
@@ -266,6 +272,8 @@ case $PMTYPE in
...
@@ -266,6 +272,8 @@ case $PMTYPE in
;;
;;
pacman
)
pacman
)
echo
"You need manually add repo to /etc/pacman.conf"
echo
"You need manually add repo to /etc/pacman.conf"
# Only for alone packages:
#sudocmd repo-add $pkg_filenames
;;
;;
npackd
)
npackd
)
docmd npackdcl add-repo
--url
=
$pkg_filenames
docmd npackdcl add-repo
--url
=
$pkg_filenames
...
@@ -339,9 +347,10 @@ __epm_changelog_local_names()
...
@@ -339,9 +347,10 @@ __epm_changelog_local_names()
;;
;;
emerge
)
emerge
)
docmd view /usr/portage/category/
$1
/ChangeLog | less
docmd view /usr/portage/category/
$1
/ChangeLog | less
# docmd equery changes -f $1 | less
;;
;;
pacman
)
pacman
)
docmd pacman
-Qc
package
| less
docmd pacman
-Qc
$1
| less
;;
;;
*
)
*
)
fatal
"Do not known command for
$PMTYPE
"
fatal
"Do not known command for
$PMTYPE
"
...
@@ -428,6 +437,9 @@ case $PMTYPE in
...
@@ -428,6 +437,9 @@ case $PMTYPE in
docmd rpm
-Va
--nofiles
--nodigest
docmd rpm
-Va
--nofiles
--nodigest
;;
;;
pacman
)
sudocmd revdep-rebuild
;;
urpm-rpm
)
urpm-rpm
)
sudocmd urpme
--auto-orphans
sudocmd urpme
--auto-orphans
;;
;;
...
@@ -542,6 +554,9 @@ case $PMTYPE in
...
@@ -542,6 +554,9 @@ case $PMTYPE in
urpm-rpm
)
urpm-rpm
)
sudocmd urpmi
--clean
sudocmd urpmi
--clean
;;
;;
pacman
)
sudocmd pacman
-Sc
;;
zypper-rpm
)
zypper-rpm
)
sudocmd zypper clean
sudocmd zypper clean
;;
;;
...
@@ -599,7 +614,8 @@ __epm_filelist_name()
...
@@ -599,7 +614,8 @@ __epm_filelist_name()
CMD
=
"rpm -ql"
CMD
=
"rpm -ql"
;;
;;
pacman
)
pacman
)
CMD
=
"pacman -Ql"
docmd pacman
-Ql
$pkg_names
|
sed
-e
"s|.* ||g"
return
;;
;;
slackpkg
)
slackpkg
)
is_installed
$pkg_names
||
fatal
"Query filelist for non installed packages does not realized"
is_installed
$pkg_names
||
fatal
"Query filelist for non installed packages does not realized"
...
@@ -666,6 +682,7 @@ case $PMTYPE in
...
@@ -666,6 +682,7 @@ case $PMTYPE in
docmd zypper info
$pkg_names
docmd zypper info
$pkg_names
;;
;;
pacman
)
pacman
)
is_installed
$pkg_names
&&
docmd pacman
-Qi
$pkg_names
&&
return
docmd pacman
-Si
$pkg_names
docmd pacman
-Si
$pkg_names
;;
;;
npackd
)
npackd
)
...
@@ -822,7 +839,9 @@ epm_install_files()
...
@@ -822,7 +839,9 @@ epm_install_files()
[
-n
"
$nodeps
"
]
&&
return
[
-n
"
$nodeps
"
]
&&
return
# fall to apt-get -f install for fix deps
# fall to apt-get -f install for fix deps
APTOPTIONS
=
"-f"
# can't use APTOPTIONS with empty install args
epm_install_names
-f
return
;;
;;
yum-rpm|dnf-rpm
)
yum-rpm|dnf-rpm
)
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
sudocmd rpm
-Uvh
$force
$nodeps
$@
&&
return
...
@@ -922,9 +941,11 @@ case $PMTYPE in
...
@@ -922,9 +941,11 @@ case $PMTYPE in
;;
;;
apt-dpkg
)
apt-dpkg
)
CMD
=
"dpkg -l
$pkg_filenames
"
CMD
=
"dpkg -l
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"dpkg-query -W --showformat=
\$
{Package}
\n
$pkg_filenames
"
;;
;;
yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
yum-rpm|urpm-rpm|zypper-rpm|dnf-rpm
)
CMD
=
"rpm -qa
$pkg_filenames
"
CMD
=
"rpm -qa
$pkg_filenames
"
[
-n
"
$short
"
]
&&
CMD
=
"rpm -qa --queryformat %{name}
\n
$pkg_filenames
"
;;
;;
emerge
)
emerge
)
CMD
=
"qlist -I"
CMD
=
"qlist -I"
...
@@ -1253,6 +1274,58 @@ epm_reinstall()
...
@@ -1253,6 +1274,58 @@ epm_reinstall()
}
}
# File bin/epm-release-upgrade:
epm_release_upgrade
()
{
echo
"Start upgrade whole system to the next release"
echo
"Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
case
$PMTYPE
in
apt-rpm
)
docmd epm update
docmd epm
install
apt rpm
showcmd
"TODO: change repo"
docmd epm Upgrade
;;
apt-dpkg
)
sudocmd
do
-release-upgrade
-d
;;
yum-rpm
)
docmd epm
install
rpm yum
sudocmd yum clean all
# TODO
showcmd rpm
-Uvh
http://mirror.yandex.ru/fedora/linux/releases/16/Fedora/x86_64/os/Packages/fedora-release-16-1.noarch.rpm
docmd epm Upgrade
;;
urpm-rpm
)
sudocmd urpmi.removemedia
-av
# TODO
showcmd urpmi.addmedia
--distrib
http://mirror.yandex.ru/mandriva/devel/2010.2/i586/
sudocmd urpmi
--auto-update
--replacefiles
;;
zypper-rpm
)
docmd epm repolist
# TODO
# sudocmd zypper rr <номер_репозитория>
showcmd rr N
showcmd epm ar http://mirror.yandex.ru/opensuse/distribution/11.1/repo/oss 11.1oss
showcmd zypper ref
docmd epm update
docmd epm
install
rpm zypper
docmd epm upgrade
;;
pacman
)
#epm upgrade
;;
*
)
fatal
"Do not known command for
$PMTYPE
"
;;
esac
sudocmd
$CMD
$pkg_filenames
}
# File bin/epm-remove:
# File bin/epm-remove:
epm_remove_low
()
epm_remove_low
()
...
@@ -1271,6 +1344,9 @@ epm_remove_low()
...
@@ -1271,6 +1344,9 @@ epm_remove_low()
emerge
)
emerge
)
sudocmd emerge
--unmerge
$@
sudocmd emerge
--unmerge
$@
return
;;
return
;;
pacman
)
sudocmd pacman
-R
$@
return
;;
slackpkg
)
slackpkg
)
sudocmd /sbin/removepkg
$@
sudocmd /sbin/removepkg
$@
return
;;
return
;;
...
@@ -1300,7 +1376,7 @@ epm_remove_names()
...
@@ -1300,7 +1376,7 @@ epm_remove_names()
sudocmd emerge
-aC
$@
sudocmd emerge
-aC
$@
return
;;
return
;;
pacman
)
pacman
)
sudocmd pacman
-R
$@
sudocmd pacman
-R
s
$@
return
;;
return
;;
yum-rpm
)
yum-rpm
)
sudocmd yum remove
$@
sudocmd yum remove
$@
...
@@ -1339,7 +1415,7 @@ epm_remove_nonint()
...
@@ -1339,7 +1415,7 @@ epm_remove_nonint()
sudocmd urpme
--auto
$@
sudocmd urpme
--auto
$@
return
;;
return
;;
pacman
)
pacman
)
sudocmd pacman
-R
--noconfirm
$@
sudocmd pacman
-R
s
--noconfirm
$@
return
;;
return
;;
yum-rpm
)
yum-rpm
)
sudocmd yum
-y
remove
$@
sudocmd yum
-y
remove
$@
...
@@ -1366,6 +1442,9 @@ epm_print_remove_command()
...
@@ -1366,6 +1442,9 @@ epm_print_remove_command()
pkgsrc
)
pkgsrc
)
echo
"pkg_delete -r
$@
"
echo
"pkg_delete -r
$@
"
;;
;;
pacman
)
echo
"pacman -R
$@
"
;;
emerge
)
emerge
)
echo
"emerge --unmerge
$@
"
echo
"emerge --unmerge
$@
"
;;
;;
...
@@ -1529,6 +1608,9 @@ case $PMTYPE in
...
@@ -1529,6 +1608,9 @@ case $PMTYPE in
yum-rpm
)
yum-rpm
)
CMD
=
"yum deplist"
CMD
=
"yum deplist"
;;
;;
pacman
)
CMD
=
"pactree"
;;
apt-dpkg
)
apt-dpkg
)
CMD
=
"apt-cache depends"
CMD
=
"apt-cache depends"
;;
;;
...
@@ -2164,12 +2246,13 @@ $(get_help HELPOPT)
...
@@ -2164,12 +2246,13 @@ $(get_help HELPOPT)
print_version
()
print_version
()
{
{
echo
"EPM package manager version 1.1.
8
"
echo
"EPM package manager version 1.1.
9
"
echo
"Running on
$(
$DISTRVENDOR
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Running on
$(
$DISTRVENDOR
)
('
$PMTYPE
' package manager uses '
$PKGFORMAT
' package format)"
echo
"Copyright (c) Etersoft 2012-2013"
echo
"Copyright (c) Etersoft 2012-2013"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
}
}
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Usage
=
"Usage: epm [options] <command> [package name(s), package files]..."
Descr
=
"epm - EPM package manager"
Descr
=
"epm - EPM package manager"
...
@@ -2188,6 +2271,7 @@ pkg_files=
...
@@ -2188,6 +2271,7 @@ pkg_files=
pkg_names
=
pkg_names
=
progname
=
"
${
0
##*/
}
"
progname
=
"
${
0
##*/
}
"
case
$progname
in
case
$progname
in
epmi
)
epmi
)
epm_cmd
=
install
epm_cmd
=
install
...
@@ -2292,6 +2376,9 @@ check_command()
...
@@ -2292,6 +2376,9 @@ check_command()
removerepo|rr
)
# HELPCMD: remove package repo
removerepo|rr
)
# HELPCMD: remove package repo
epm_cmd
=
removerepo
epm_cmd
=
removerepo
;;
;;
release-upgrade
)
# HELPCMD: update whole system to the next release
epm_cmd
=
release_upgrade
;;
# Other commands
# Other commands
clean
)
# HELPCMD: clean local package cache
clean
)
# HELPCMD: clean local package cache
...
@@ -2387,7 +2474,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
...
@@ -2387,7 +2474,7 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
if
[
-z
"
$epm_cmd
"
]
;
then
if
[
-z
"
$epm_cmd
"
]
;
then
print_version
print_version
echo
echo
fatal
"Run
$
epm
--help for get help"
fatal
"Run
$
$progname
--help for get help"
fi
fi
# Run helper for command
# Run helper for command
...
...
packed/serv.sh
View file @
bb13cc4e
...
@@ -144,6 +144,10 @@ strip_spaces()
...
@@ -144,6 +144,10 @@ strip_spaces()
echo
"
$*
"
| filter_strip_spaces
echo
"
$*
"
| filter_strip_spaces
}
}
epm
()
{
$PROGDIR
/epm
$@
}
fatal
()
fatal
()
{
{
...
@@ -917,13 +921,15 @@ $(get_help HELPOPT)
...
@@ -917,13 +921,15 @@ $(get_help HELPOPT)
print_version
()
print_version
()
{
{
echo
"Service manager version 1.1.
8
"
echo
"Service manager version 1.1.
9
"
echo
"Running on
$(
$DISTRVENDOR
)
"
echo
"Running on
$(
$DISTRVENDOR
)
"
echo
"Copyright (c) Etersoft 2012, 2013"
echo
"Copyright (c) Etersoft 2012, 2013"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
}
}
Usage
=
"Usage: serv [options] [<service>] [<command>] [params]..."
progname
=
"
${
0
##*/
}
"
Usage
=
"Usage:
$progname
[options] [<service>] [<command>] [params]..."
Descr
=
"serv - Service manager"
Descr
=
"serv - Service manager"
set_service_type
set_service_type
...
@@ -936,6 +942,7 @@ serv_cmd=
...
@@ -936,6 +942,7 @@ serv_cmd=
service_name
=
service_name
=
params
=
params
=
check_command
()
check_command
()
{
{
# do not override command
# do not override command
...
@@ -1025,7 +1032,7 @@ echover "command: $serv_cmd"
...
@@ -1025,7 +1032,7 @@ echover "command: $serv_cmd"
if
[
"
$serv_cmd
"
!=
"list"
]
&&
[
"
$serv_cmd
"
!=
"list_all"
]
&&
[
-z
"
$service_name
"
]
;
then
if
[
"
$serv_cmd
"
!=
"list"
]
&&
[
"
$serv_cmd
"
!=
"list_all"
]
&&
[
-z
"
$service_name
"
]
;
then
print_version
print_version
echo
echo
fatal
"Run
$
serv
--help for get help"
fatal
"Run
$
$progname
--help for get help"
fi
fi
if
[
-z
"
$serv_cmd
"
]
;
then
if
[
-z
"
$serv_cmd
"
]
;
then
...
...
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