From 6241956df1aaeec3b98f5872506b9e7510fac18f Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 22 Jan 2025 10:13:12 -0800 Subject: [PATCH] more celanup Signed-off-by: Jess Frazelle --- .bash_profile | 2 -- .bashrc | 22 ++++++++++++++++++---- .path | 6 +++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.bash_profile b/.bash_profile index f0ab80875..f89337b51 100644 --- a/.bash_profile +++ b/.bash_profile @@ -5,5 +5,3 @@ if [[ -r "${HOME}/.bashrc" ]]; then # shellcheck source=/dev/null source "${HOME}/.bashrc" fi - -. "$HOME/.cargo/env" diff --git a/.bashrc b/.bashrc index caa7cf54f..907fee30f 100644 --- a/.bashrc +++ b/.bashrc @@ -96,16 +96,30 @@ if ! shopt -oq posix; then fi if [[ -d /etc/bash_completion.d/ ]]; then for file in /etc/bash_completion.d/* ; do - # shellcheck source=/dev/null - source "$file" + if [[ -n $BASHRC_BENCH ]]; then + TIMEFORMAT="$file: %R" + # shellcheck source=/dev/null + time source "$file" + unset TIMEFORMAT + else + # shellcheck source=/dev/null + source "$file" + fi done fi # We do this before the following so that all the paths work. for file in ~/.{bash_prompt,aliases,functions,path,dockerfunc,extra,exports}; do if [[ -r "$file" ]] && [[ -f "$file" ]]; then - # shellcheck source=/dev/null - source "$file" + if [[ -n $BASHRC_BENCH ]]; then + TIMEFORMAT="$file: %R" + # shellcheck source=/dev/null + time source "$file" + unset TIMEFORMAT + else + # shellcheck source=/dev/null + source "$file" + fi fi done unset file diff --git a/.path b/.path index aa81b94c0..300764eaf 100644 --- a/.path +++ b/.path @@ -56,7 +56,7 @@ export LDFLAGS="${LDFLAGS} -L/opt/homebrew/lib" export CPPFLAGS="${CPPFLAGS} -I/opt/homebrew/include" # shellcheck source=/dev/null -if [ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]; then . "/opt/homebrew/etc/profile.d/bash_completion.sh"; fi +if [ -f "/opt/homebrew/etc/profile.d/bash_completion.sh" ]; then . "/opt/homebrew/etc/profile.d/bash_completion.sh"; fi # OpenSSL export PATH="/opt/homebrew/opt/openssl/bin:${PATH}" @@ -73,8 +73,8 @@ export PATH="/opt/homebrew/opt/llvm/bin:${PATH}" # CXXFLAGS CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -Wno-deprecated-declarations -Wno-deprecated -framework CoreFoundation" -. "$HOME/.cargo/env" -export RUST_SYSROOT="$(rustc --print sysroot)" +# Rust +RUST_SYSROOT="$(rustc --print sysroot)" export RUST_SRC_PATH="${RUST_SYSROOT}/lib/rustlib/src/rust/src" export DYLD_LIBRARY_PATH="${RUST_SYSROOT}/lib:$DYLD_LIBRARY_PATH"