-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b862041
commit 9636260
Showing
1 changed file
with
0 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |