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
fffa7293
Commit
fffa7293
authored
Oct 08, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed
parent
877249a8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+48
-1
No files found.
packed/epm.sh
View file @
fffa7293
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
fffa7293
...
@@ -220,6 +220,40 @@ set_sudo()
...
@@ -220,6 +220,40 @@ set_sudo()
SUDO
=
"fatal 'Can't find sudo. Please install sudo or run epm under root.'"
SUDO
=
"fatal 'Can't find sudo. Please install sudo or run epm under root.'"
}
}
assure_exists
()
{
PATH
=
$PATH
:/sbin:/usr/sbin which
$1
2>/dev/null
>
/dev/null
&&
return
echo
"Install appropriate package for
$1
command..."
case
$1
in
equery|revdep-rebuild
)
epm
install
gentoolkit
;;
apt-repo
)
epm
install
apt-repo
;;
apt-file
)
epm
install
apt-file
;;
update-kernel|remove-old-kernels
)
epm
install
update-kernel
;;
*
)
fatal
"Internal error: Unknown binary
$1
to check if exists"
;;
esac
}
get_package_type
()
{
local
i
for
i
in
deb rpm
;
do
[
"
${
1
/.
$i
/
}
"
!=
"
$1
"
]
&&
echo
$i
&&
return
done
echo
"
$1
"
return
0
}
get_help
()
get_help
()
{
{
grep
-v
--
"^#"
$0
|
grep
--
"#
$1
"
|
while
read
n
;
do
grep
-v
--
"^#"
$0
|
grep
--
"#
$1
"
|
while
read
n
;
do
...
@@ -289,6 +323,9 @@ case $DISTRNAME in
...
@@ -289,6 +323,9 @@ case $DISTRNAME in
OpenWRT
)
OpenWRT
)
CMD
=
"ipkg"
CMD
=
"ipkg"
;;
;;
GNU/Linux/Guix
)
CMD
=
"guix"
;;
*
)
*
)
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
fatal
"Have no suitable DISTRNAME
$DISTRNAME
"
;;
;;
...
@@ -836,6 +873,16 @@ elif [ `uname` = "SunOS" ] ; then
...
@@ -836,6 +873,16 @@ elif [ `uname` = "SunOS" ] ; then
DISTRIB_ID
=
"SunOS"
DISTRIB_ID
=
"SunOS"
DISTRIB_RELEASE
=
$(
uname
-r
)
DISTRIB_RELEASE
=
$(
uname
-r
)
# fixme: can we detect by some file?
elif
[
`
uname
`
=
"Darwin"
]
;
then
DISTRIB_ID
=
"MacOS"
DISTRIB_RELEASE
=
$(
uname
-r
)
# fixme: move to up
elif
[
`
uname
`
=
"Linux"
]
&&
which guix 2>/dev/null
>
/dev/null
;
then
DISTRIB_ID
=
"GNU/Linux/Guix"
DISTRIB_RELEASE
=
$(
uname
-r
)
# try use standart LSB info by default
# try use standart LSB info by default
elif
distro lsb-release
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
elif
distro lsb-release
&&
[
-n
"
$DISTRIB_RELEASE
"
]
;
then
# use LSB
# use LSB
...
@@ -981,7 +1028,7 @@ $(get_help HELPOPT)
...
@@ -981,7 +1028,7 @@ $(get_help HELPOPT)
print_version
()
print_version
()
{
{
echo
"Service manager version 1.4.
1
"
echo
"Service manager version 1.4.
2
"
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."
...
...
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