Skip to content

Commit

Permalink
trim down .dotfiles-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Oct 23, 2023
1 parent b862041 commit 9636260
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions rc/.dotfiles-rc
Original file line number Diff line number Diff line change
@@ -1,50 +1,2 @@
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !

# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
echo "WARNING: shell appears to be non-interactive" >&2
# return
fi

debug() {
if [ ! -z "$VERBOSE" -o ! -z "$DEBUG" ]; then
echo $@
fi
}

vb() {
if [ -n "$VERBOSE" ]; then
unset VERBOSE
echo "quiet mode enabled"
else
export VERBOSE=1
echo "verbose mode enabled"
fi
}

# Uncomment to log info about files being sourced, etc.
# VERBOSE=1

export REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

try_source() {
for arg in "$@"; do
if [ -s "$arg" ]; then
debug "Sourcing: $arg"
source "$arg"
else
debug "Couldn't source nonexistent file: '$arg'"
fi
done
}

echo "Adding git helpers repo $REPO/git to PATH"
export PATH="$REPO/git:$PATH"

0 comments on commit 9636260

Please sign in to comment.