mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 10:26:42 +00:00
slightly better shell initialization with a semi-sane fallback
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
#
|
||||
|
||||
# Set path to root of dotfiles
|
||||
if [ -n "${BASH_SOURCE[0]}" ]; then
|
||||
if [ -n "${BASH_SOURCE[0]}" ] && [ -f "${BASH_SOURCE[0]}" ] ; then
|
||||
DOTFILES="`dirname \"${BASH_SOURCE[0]}\"`"
|
||||
elif [ -n "$0" ]; then
|
||||
elif [ -n "$0" ] && [ -f "$0" ]; then
|
||||
DOTFILES="`dirname \"$0\"`"
|
||||
elif [ -d "$HOME/.dotfiles" ]; then
|
||||
DOTFILES="$HOME/.dotfiles"
|
||||
fi
|
||||
|
||||
# Load main dotfiles
|
||||
|
||||
Reference in New Issue
Block a user