diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index c899dbba6ae20e..455013a3e88621 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -14,17 +14,11 @@ # limitations under the License. # -if [[ ! -d ${CHIP_ROOT} ]]; then - if [[ -n ${BASH_SOURCE[0]} ]]; then - CHIP_ROOT=$(cd "${BASH_SOURCE[0]%/*}/.." && pwd) - else - CHIP_ROOT=$(cd "${0%/*}/.." && pwd) - fi -fi - if [[ -n ${BASH_SOURCE[0]} ]]; then + CHIP_ROOT=$(cd "${BASH_SOURCE[0]%/*}/.." && pwd) me=${BASH_SOURCE[0]##*/} else + CHIP_ROOT=$(cd "${0%/*}/.." && pwd) me=${0##*/} fi