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
29bb2c21
Commit
29bb2c21
authored
Oct 21, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update packed
parent
8e0db7bb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
12 deletions
+36
-12
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+36
-12
No files found.
packed/epm.sh
View file @
29bb2c21
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
29bb2c21
...
...
@@ -95,7 +95,7 @@ showcmd()
if
[
-z
"
$quiet
"
]
;
then
set_boldcolor
$GREEN
local
PROMTSIG
=
"
\$
"
[
"
$UID
"
=
0
]
&&
PROMTSIG
=
"#"
[
"
$
EFF
UID
"
=
0
]
&&
PROMTSIG
=
"#"
echo
"
$PROMTSIG
$@
"
restore_color
fi
>
&2
...
...
@@ -170,15 +170,19 @@ store_output()
{
# use make_temp_file from etersoft-build-utils
RC_STDOUT
=
$(
mktemp
)
local
CMDSTATUS
=
$RC_STDOUT
.pipestatus
echo
1
>
$CMDSTATUS
#RC_STDERR=$(mktemp)
"
$@
"
2>&1 |
tee
$RC_STDOUT
(
"
$@
"
2>&1
;
echo
$?
>
$CMDSTATUS
)
|
tee
$RC_STDOUT
return
$(
cat
$CMDSTATUS
)
# bashism
# http://tldp.org/LDP/abs/html/bashver3.html#PIPEFAILREF
return
$PIPESTATUS
#
return $PIPESTATUS
}
clean_store_output
()
{
rm
-f
$RC_STDOUT
rm
-f
$RC_STDOUT
$RC_STDOUT
.pipestatus
}
...
...
@@ -208,11 +212,10 @@ set_sudo()
# skip SUDO if disabled
[
-n
"
$EPMNOSUDO
"
]
&&
return
# set SUDO not for root user
[
-n
"
$UID
"
]
||
UID
=
`
id
-u
`
EFFUID
=
`
id
-u
`
# do not need sudo
[
$UID
=
"0"
]
&&
return
[
$
EFF
UID
=
"0"
]
&&
return
# use sudo if possible
which
sudo
>
/dev/null 2>/dev/null
&&
SUDO
=
"sudo"
&&
return
...
...
@@ -220,6 +223,16 @@ set_sudo()
SUDO
=
"fatal 'Can't find sudo. Please install sudo or run epm under root.'"
}
set_eatmydata
()
{
# skip if disabled
[
-n
"
$EPMNOEATMYDATA
"
]
&&
return
# use if possible
which eatmydata
>
/dev/null 2>/dev/null
||
return
SUDO
=
"
$SUDO
eatmydata"
echo
"Uwaga! eatmydata is installed, we will use it for disable all sync operations."
}
assure_exists
()
{
PATH
=
$PATH
:/sbin:/usr/sbin which
$1
2>/dev/null
>
/dev/null
&&
return
...
...
@@ -246,11 +259,22 @@ assure_exists()
get_package_type
()
{
local
i
for
i
in
deb rpm
;
do
[
"
${
1
/.
$i
/
}
"
!=
"
$1
"
]
&&
echo
$i
&&
return
done
echo
"
$1
"
return
0
case
$1
in
*
.deb
)
echo
"deb"
return
;;
*
.rpm
)
echo
"rpm"
return
;;
*
)
#fatal "Don't know type of $1"
# return package name for info
echo
"
$1
"
return
1
;;
esac
}
...
...
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