diff --git a/ble.pp b/ble.pp index 4cf4152b..9356cfa8 100644 --- a/ble.pp +++ b/ble.pp @@ -67,8 +67,10 @@ esac if [[ $- != *i* ]]; then - { ((${#BASH_SOURCE[@]})) && case ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} in (*bashrc|*bash_profile) ;; (*) false ;; esac } || - echo "ble.sh: This is not an interactive session." >&2 + case " ${BASH_SOURCE[*]##*/} " in + (*' .bashrc '* | *' .bash_profile '* | *' .profile '* | *' bashrc '* | *' profile '*) false ;; + esac && + builtin echo "ble.sh: This is not an interactive session." >&2 || ((1)) return 1 2>/dev/null || exit 1 fi