Sometimes a leading '-' shows up in $0 for login shells, for example
this happens when opening a shell with "sudo -i"; in these cases $0 will
look like "-bash" instead of "bash", and the comparison with $(basename
$SHELL) fails even if the script is being sourced.
Fix this by stripping the leading '-'.
-[ "$0" = "$(basename $SHELL)" ] || { echo "This script is meant to be sourced, not executed" 1>&2; exit 1; }
+[ "${0#-}" = "$(basename $SHELL)" ] || { echo "This script is meant to be sourced, not executed" 1>&2; exit 1; }
export ANDROID_HOME=$HOME/Android/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
export ANDROID_HOME=$HOME/Android/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools