Skip to content

Instantly share code, notes, and snippets.

@goozbach
Created August 25, 2011 23:02
Show Gist options
  • Save goozbach/1172258 to your computer and use it in GitHub Desktop.
Save goozbach/1172258 to your computer and use it in GitHub Desktop.
profile.d in homedir
# source user definitions, only show output if $PS1 set
# to add a new one, drop it in ${HOME}/.profile.d/
if [ -d ${HOME}/.profile.d/ ]; then
# sourcing *.sh
for i in ${HOME}/.profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
source $i
else
source $i &>/dev/null
fi
fi
done
# sourcing *.bash
for i in ${HOME}/.profile.d/*.bash ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
source $i
else
source $i &>/dev/null
fi
fi
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment