better output format for entrypoint generic command and try

master
David Kebler 2023-04-22 10:22:50 -07:00
parent 98e943037c
commit abea829cab
2 changed files with 6 additions and 2 deletions

View File

@ -27,13 +27,15 @@ shift 1
/bin/bash -l -c '${ENTRYPOINT_CMD_PATH:-$BIN_DIR/start} $@' $0 "$@"
;;
*)
echo command passed to container "$*"
echo "--- command passed to container: $* ---"
echo -e "output:\n"
if [ -n "$*" ]; then
if ! /bin/bash -l -c '$@' $0 "$@" ; then
$BIN_DIR/entrypoint-help
fi
echo -e "\n------------------------------\n"
else
echo no command was passed to entrypoint
echo "!!!! no command was passed to entrypoint !!!! "
echo
$BIN_DIR/entrypoint-help
fi

View File

@ -158,7 +158,9 @@ END
elif [[ $script ]]; then
$([[ -f $script ]] && echo cat || echo "echo") "$script" | $dcmd
else
echo -e "\n ----------------------------------------------"
$dcmd
echo -e "\n ----------------------------------------------"
echo -e "\ndone with session, removing containter try-$name"
if [[ $mp ]] ; then
echo removing volume $vname used for mapping