Commit 723f0d9c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: change CMDSHELL to /usr/bin/env bash and use CMDSHELL for call scripts

parent b5c87d2d
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
PROGDIR=$(dirname "$0") PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0") PROGNAME=$(basename "$0")
[ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)" [ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)"
CMDSHELL="/bin/bash" CMDSHELL="/usr/bin/env bash"
# TODO: pwd for ./epm and which for epm # TODO: pwd for ./epm and which for epm
[ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR" [ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR"
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
......
...@@ -516,7 +516,7 @@ eget() ...@@ -516,7 +516,7 @@ eget()
local EGET local EGET
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_eget ] ; then if [ -s $SHAREDIR/tools_eget ] ; then
( EGET_BACKEND=$eget_backend $SHAREDIR/tools_eget "$@" ) ( EGET_BACKEND=$eget_backend $CMDSHELL $SHAREDIR/tools_eget "$@" )
return return
fi fi
fatal "Internal error: missed tools_eget" fatal "Internal error: missed tools_eget"
...@@ -541,7 +541,7 @@ erc() ...@@ -541,7 +541,7 @@ erc()
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then if [ -s $SHAREDIR/tools_erc ] ; then
$SHAREDIR/tools_erc "$@" $CMDSHELL $SHAREDIR/tools_erc "$@"
return return
fi fi
fatal "Internal error: missed tools_erc" fatal "Internal error: missed tools_erc"
...@@ -560,7 +560,7 @@ ercat() ...@@ -560,7 +560,7 @@ ercat()
local ERCAT local ERCAT
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_ercat ] ; then if [ -s $SHAREDIR/tools_ercat ] ; then
$SHAREDIR/tools_ercat "$@" $CMDSHELL $SHAREDIR/tools_ercat "$@"
return return
fi fi
fatal "Internal error: missed tools_ercat" fatal "Internal error: missed tools_ercat"
...@@ -575,7 +575,7 @@ ercat() ...@@ -575,7 +575,7 @@ ercat()
estrlist() estrlist()
{ {
if [ -s $SHAREDIR/tools_estrlist ] ; then if [ -s $SHAREDIR/tools_estrlist ] ; then
$SHAREDIR/tools_estrlist "$@" $CMDSHELL $SHAREDIR/tools_estrlist "$@"
return return
fi fi
fatal "missed tools_estrlist" fatal "missed tools_estrlist"
......
...@@ -60,7 +60,7 @@ epm_tool() ...@@ -60,7 +60,7 @@ epm_tool()
;; ;;
"json") # HELPCMD: json operations "json") # HELPCMD: json operations
showcmd json "$@" showcmd json "$@"
$SHAREDIR/tools_json "$@" $CMDSHELL $SHAREDIR/tools_json "$@"
;; ;;
"which") "which")
print_command_path "$@" # HELPCMD: which like command (no output to stderr, can works without which package) print_command_path "$@" # HELPCMD: which like command (no output to stderr, can works without which package)
......
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