You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #
- # ~/.bashrc
- #
-
- # If not running interactively, don't do anything
- [[ $- != *i* ]] && return
-
- source $HOME/.profile 2>/dev/null
-
- export BASHRC_PROFILE_INDENT=
-
- for script in ~/.bashrc.d/*.sh; do
- if [ -x "$script" ]; then
- test -n "$BASHRC_DEBUG" && echo "Sourcing $script"
-
- if [ -n "$BASHRC_PROFILE" ]; then
- source <(
- sed \
- -e 's:function .*$:&\
- local profile_begin=`date +%s%N`\
- echo "$BASHRC_PROFILE_INDENT" "+" "${FUNCNAME[0]}" "$@" >>"$HOME/bashrc.perf"\
- BASHRC_PROFILE_INDENT+=" ":' \
- -e 's:^[[:space:]]*\(}\|return .*\)[[:space:]]*$:\
- local profile_end=`date +%s%N`\
- BASHRC_PROFILE_INDENT="${BASHRC_PROFILE_INDENT% }"\
- echo "$BASHRC_PROFILE_INDENT" "-" "`tput setaf 4`$((($profile_end - $profile_begin) / 1000000))ms`tput sgr0`" "${FUNCNAME[0]}" "$@" >>"$HOME/bashrc.perf"\
- &:' \
- "$script"
- )
- else
- source "$script"
- fi
- else
- test -n "$BASHRC_DEBUG" && echo "Skipping non-executable $script"
- fi
- done
-
- true
|