Commit 4ef735ef authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: epm(): use EPMMODE instead of PROGNAME

parent 80fd15cc
...@@ -290,21 +290,22 @@ clean_store_output() ...@@ -290,21 +290,22 @@ clean_store_output()
# run epm, possible from side repo # run epm, possible from side repo
epm() epm()
{ {
if [ -n "$PROGNAME" ] ; then if [ "$EPMMODE" = "pipe" ] ; then
local bashopt=''
[ -n "$verbose" ] && bashopt='-x'
$CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
else
epm_main --inscript "$@" epm_main --inscript "$@"
return
fi fi
# run epm again to full initialization
local bashopt=''
[ -n "$verbose" ] && bashopt='-x'
$CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
} }
# run $SUDO epm, possible from side repo # run $SUDO epm, possible from side repo
sudoepm() sudoepm()
{ {
[ -n "$PROGNAME" ] || fatal "Can't use sudo epm call from the piped script" [ "$EPMMODE" = "pipe" ] && fatal "Can't use sudo epm call from the piped script"
local bashopt='' local bashopt=''
[ -n "$verbose" ] && bashopt='-x' [ -n "$verbose" ] && bashopt='-x'
......
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