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
72a29942
Commit
72a29942
authored
Feb 26, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update packed
parent
b4ceac0c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
+29
-15
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+29
-15
No files found.
packed/epm.sh
View file @
72a29942
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
72a29942
...
...
@@ -37,7 +37,7 @@ load_helper()
inputisatty
()
{
# check stdin
tty
-s
tty
-s
2>/dev/null
}
isatty
()
...
...
@@ -60,6 +60,12 @@ check_tty()
[
-n
"
$TERM
"
]
||
TERM
=
dumb
export
TERM
# egrep from busybox may not --color
# egrep from MacOS print help to stderr
if
egrep
--help
2>&1 |
grep
-q
--
"--color"
;
then
EGREPCOLOR
=
"--color"
fi
which tput
>
/dev/null 2>/dev/null
||
return
# FreeBSD does not support tput -S
echo
| tput
-S
>
/dev/null 2>/dev/null
||
return
...
...
@@ -89,10 +95,17 @@ restore_color()
echover
()
{
[
-
n
"
$verbose
"
]
||
return
[
-
z
"
$verbose
"
]
&&
return
echo
"
$*
"
>
&2
}
echon
()
{
# default /bin/sh on MacOS does not recognize -n
/bin/echo
-n
"
$@
"
}
set_target_pkg_env
()
{
[
-n
"
$DISTRNAME
"
]
||
fatal
"Run set_target_pkg_env without DISTRNAME"
...
...
@@ -120,47 +133,47 @@ showcmd()
docmd
()
{
showcmd
"
$@$EXTRA_SHOWDOCMD
"
"
$@
"
$@
}
docmd_foreach
()
{
local
cmd
local
cmd
pkg
cmd
=
"
$1
"
#showcmd "$@"
shift
for
pkg
in
"
$@
"
;
do
docmd
$cmd
$pkg
docmd
"
$cmd
"
$pkg
done
}
sudocmd
()
{
showcmd
"
$SUDO
$@
"
$SUDO
"
$@
"
$SUDO
$@
}
sudocmd_foreach
()
{
local
cmd
local
cmd
pkg
cmd
=
"
$1
"
#showcmd "$@"
shift
for
pkg
in
"
$@
"
;
do
sudocmd
$cmd
$pkg
sudocmd
"
$cmd
"
$pkg
done
}
get_firstarg
()
{
echo
-
n
"
$1
"
echon
"
$1
"
}
get_lastarg
()
{
local
lastarg
eval
lastarg
=
\$
{
$#}
echo
-
n
"
$lastarg
"
echon
"
$lastarg
"
}
...
...
@@ -189,7 +202,7 @@ store_output()
local
CMDSTATUS
=
$RC_STDOUT
.pipestatus
echo
1
>
$CMDSTATUS
#RC_STDERR=$(mktemp)
(
"
$@
"
2>&1
;
echo
$?
>
$CMDSTATUS
)
|
tee
$RC_STDOUT
(
$@
2>&1
;
echo
$?
>
$CMDSTATUS
)
|
tee
$RC_STDOUT
return
$(
cat
$CMDSTATUS
)
# bashism
# http://tldp.org/LDP/abs/html/bashver3.html#PIPEFAILREF
...
...
@@ -201,7 +214,6 @@ clean_store_output()
rm
-f
$RC_STDOUT
$RC_STDOUT
.pipestatus
}
epm
()
{
$PROGDIR
/epm
$@
...
...
@@ -321,15 +333,16 @@ if [ -n "$FORCEPM" ] ; then
fi
case
$DISTRNAME
in
ALTLinux
|PCLinux
)
ALTLinux
)
CMD
=
"apt-rpm"
#which d
eepsolver
2>/dev/null >/dev/null && CMD=deepsolver-rpm
#which d
s-install
2>/dev/null >/dev/null && CMD=deepsolver-rpm
;;
PCLinux
)
CMD
=
"apt-rpm"
;;
Ubuntu|Debian|Mint
)
CMD
=
"apt-dpkg"
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
;;
Mandriva|ROSA
)
CMD
=
"urpm-rpm"
...
...
@@ -345,6 +358,7 @@ case $DISTRNAME in
;;
Fedora|LinuxXP|ASPLinux|CentOS|RHEL|Scientific
)
CMD
=
"yum-rpm"
#which dnf 2>/dev/null >/dev/null && CMD=dnf-rpm
;;
Slackware
)
CMD
=
"slackpkg"
...
...
@@ -1078,7 +1092,7 @@ $(get_help HELPOPT)
print_version
()
{
echo
"Service manager version 1.
4.6
"
echo
"Service manager version 1.
5.0
"
echo
"Running on
$(
$DISTRVENDOR
)
"
echo
"Copyright (c) Etersoft 2012, 2013"
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