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

epm: use global CMDSHELL=/bin/sh

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