#!/bin/shset-e### debugging#echo "$@"#set -ux# run the entrypoint if one of the following conditions is true:# * the first parameter is an option (it begins with an '-')# * the first parameter is not a command found in PATH (i.e. "bash")# * the first parameter is a directory#if["${1#-}"!="${1}"]||[!-x"$(command-v"${1}")"]||[-d"${1}"]then# reset the script parameters to the following commandsset--"${ENTRYPOINT}""$@"fiexec"$@"