You need to sign in or sign up before continuing.
Commit 51b200c2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce store_output (copied from eepm)

parent 552b26e4
......@@ -5,6 +5,7 @@
# $1 - needed VERSION of etersoft-build-utils. f.i. 162
# TODO: remove it and use appropriate command directly
# for systems without realpath command
realpath()
{
......@@ -32,6 +33,8 @@ fatal()
exit 1
}
# TODO: add onexit function
# Just print warning message
warning()
{
......@@ -48,6 +51,25 @@ remove_file_from_remove()
ETERSOFT_FATAL_REMOVE_FILES=$(estrlist exclude "$*" "$ETERSOFT_FATAL_REMOVE_FILES")
}
# copied from eepm (and modified)
store_output()
{
# use make_temp_file from etersoft-build-utils
RC_STDOUT=$(mktemp)
mark_file_to_remove $RC_STDOUT
#RC_STDERR=$(mktemp)
"$@" 2>&1 | tee $RC_STDOUT
# http://tldp.org/LDP/abs/html/bashver3.html#PIPEFAILREF
return $PIPESTATUS
}
# TODO: realize onexit handler (see before) and drop out this clean from use
clean_store_output()
{
rm -f $RC_STDOUT
}
# end of copied from eepm
set_eterbuilddir()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment