Skip to content

Instantly share code, notes, and snippets.

@workmad3
Last active August 29, 2015 14:03
Show Gist options
  • Save workmad3/b08e46e5df3236ba4cb5 to your computer and use it in GitHub Desktop.
Save workmad3/b08e46e5df3236ba4cb5 to your computer and use it in GitHub Desktop.
# Load *.bash files in the .bashrc.d directory. Put bash config files there.
export $BASH_D=$HOME/.bashrc.d
if [ -d $BASH_D ]; then
for conf in $BASH_D/*.bash; do
. $conf
done
fi
source $HOME/.profile
# Loads environment variables from .profile.d directory.
# The filename is the variable name, the file contents is the value
export $PROFILE_D=$HOME/.profile.d
if [ -d $PROFILE_D ]; then
for conf in `ls $PROFILE_D`; do
export ${conf}=`cat $PROFILE_D/${conf}`
done
fi
# Load *.zsh files in the .zshrc.d directory. Put zsh config files there.
export $ZSH_D=$HOME/.zshrc.d
if [ -d $ZSH_D ]; then
for conf in $ZSH_D/*.zsh; do
. $conf
done
fi
source $HOME/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment