Commit 3cc44a56 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: use global CMDSHELL=/bin/sh

parent c56b7961
......@@ -20,6 +20,7 @@
PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0")
CURDIR="$(pwd)"
CMDSHELL="/bin/sh"
# TODO: pwd for ./epm and which for epm
[ "$PROGDIR" = "." ] && PROGDIR="$CURDIR"
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
......
......@@ -57,7 +57,7 @@ __epm_pack()
local bashopt=''
[ -n "$verbose" ] && bashopt='-x' && export EPM_VERBOSE="$verbose"
#info "Running $($script --description 2>/dev/null) ..."
docmd bash $bashopt $repackcode "$tarname" "$filefortarname" || fatal
docmd $CMDSHELL $bashopt $repackcode "$tarname" "$filefortarname" || fatal
returntarname="$(cat "$filefortarname")" || fatal "pack script $repackcode didn't set tarname"
if [ -n "$download_only" ] ; then
......
......@@ -156,7 +156,7 @@ __epm_play_run()
local bashopt=''
[ -n "$verbose" ] && bashopt='-x' && export EPM_VERBOSE="$verbose"
#info "Running $($script --description 2>/dev/null) ..."
docmd bash $bashopt $script "$@"
docmd $CMDSHELL $bashopt $script "$@"
}
__epm_play_list_installed()
......
......@@ -291,7 +291,7 @@ clean_store_output()
epm()
{
if [ -n "$PROGNAME" ] ; then
/bin/sh $PROGDIR/$PROGNAME --inscript "$@"
$CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
else
epm_main --inscript "$@"
fi
......@@ -301,7 +301,7 @@ epm()
sudoepm()
{
[ -n "$PROGNAME" ] || fatal "Can't use sudo epm call from the piped script"
sudorun /bin/sh $PROGDIR/$PROGNAME --inscript "$@"
sudorun $CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
}
# Print error message and stop the program
......
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