only use if defined

This commit is contained in:
Jonne Haß 2012-01-24 19:45:46 +01:00
parent 6f283632c5
commit cb14572083

7
.rvmrc
View file

@ -1,6 +1,11 @@
#!/bin/bash
root=$(dirname $(readlink -e $BASH_SOURCE))
if [ -n "${BASH_SOURCE}" ]; then
root=$(dirname $(readlink -e $BASH_SOURCE))
else
root="."
fi
if [ -e "${root}/.rvmrc_custom" ]; then
source ${root}/.rvmrc_custom
else