diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-07-05 23:00:54 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-07-05 23:00:54 +0200 |
commit | 70da59dbfa67d201d2c58c656e24f28d216d83bf (patch) | |
tree | f2a07d95fcd44455e20e2adbcc0c8212d678a071 /bashrc/main.sh | |
parent | b7c03b98b40a264c6cab0b90b9849d9a87ca34a6 (diff) | |
download | dotfiles-70da59dbfa67d201d2c58c656e24f28d216d83bf.tar.gz dotfiles-70da59dbfa67d201d2c58c656e24f28d216d83bf.tar.xz dotfiles-70da59dbfa67d201d2c58c656e24f28d216d83bf.zip |
changed wildcard load
Diffstat (limited to 'bashrc/main.sh')
-rw-r--r-- | bashrc/main.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bashrc/main.sh b/bashrc/main.sh index 0982f6e..e967e53 100644 --- a/bashrc/main.sh +++ b/bashrc/main.sh @@ -62,10 +62,16 @@ _load() { esac fi - if [[ -r ${base}/${path} || ($1 == "node" && $2 == "*") ]]; then - source ${base}/${path} 2>&1 > /dev/null + if [[ -r ${base}/${path} ]]; then + source ${base}/${path} 2>&1 > /dev/null + elif [[ $1 == "node" && $2 == "*" ]]; then + for file in ${base}/${path}; do + if [[ -r $file ]]; then + source $file 2>&1 > /dev/null + fi + done elif [[ ${pedantic} -eq 1 ]]; then - echo "error: cannot find necessary startup file: ${base}/${path}" + echo "error: cannot find necessary startup file: ${base}/${path}" fi } |