forked from colonelpanic/dotfiles
Add source_directory_files and use it everywhere
This commit is contained in:
parent
b153b5d339
commit
1c4ea43278
@ -67,3 +67,10 @@ function environment_variable_exists {
|
||||
function command_exists {
|
||||
hash "$1" 2>/dev/null 1>/dev/null
|
||||
}
|
||||
|
||||
function source_directory_files {
|
||||
for filename in "$1"/*; do
|
||||
environment_variable_exists SHELL_STARTUP_DEBUG && echo "Sourcing $filename"
|
||||
source "$filename"
|
||||
done
|
||||
}
|
||||
|
@ -15,10 +15,4 @@ environment_variable_exists ENVIRONMENT_SETUP_DONE || _setup_env
|
||||
# _ruby_setup
|
||||
_python_setup
|
||||
|
||||
function _source_shellenv_files {
|
||||
for filename in ~/.lib/shellenv/*; do
|
||||
source $filename
|
||||
done
|
||||
}
|
||||
|
||||
_source_shellenv_files
|
||||
source_directory_files "$HOME/.lib/shellenv"
|
||||
|
@ -5,7 +5,11 @@ function _setup_env {
|
||||
|
||||
add_to_path "$HOME/.local/bin" "$HOME/.lib/bin" "$HOME/bin" "/usr/local/bin" --before
|
||||
_ruby_setup
|
||||
_python_setup
|
||||
|
||||
# XXX/TODO:
|
||||
# This is in shellenv.sh now
|
||||
# _python_setup
|
||||
|
||||
is_osx && _osx_path_setup
|
||||
_emacs_setup
|
||||
_java_setup
|
||||
|
@ -1,6 +1,4 @@
|
||||
for filename in ~/.lib/shellrc/*; do
|
||||
source $filename
|
||||
done
|
||||
source_directory_files "$HOME/.lib/shellrc"
|
||||
|
||||
[ -s "/usr/local/bin/virtualenvwrapper.sh" ] && . /usr/local/bin/virtualenvwrapper.sh
|
||||
function j() {
|
||||
|
@ -1,6 +1,4 @@
|
||||
for filename in ~/.lib/zsh/*; do
|
||||
source $filename
|
||||
done
|
||||
source_directory_files "$HOME/.lib/zsh"
|
||||
|
||||
alias srczsh="source ~/.zshrc"
|
||||
alias zshenv="source ~/.zshenv"
|
||||
|
Loading…
Reference in New Issue
Block a user