-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
50 lines (36 loc) · 1.06 KB
/
bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!bash
#echo "START MYBASH 'bashrc'"
[[ -n "$MYBASH_LOADED_BASHRC" ]] && return
if [[ -z "$MYBASH_HOME" ]] && [[ -s "$HOME/.mybash_profile" ]]; then
source "$HOME/.mybash_profile"
fi
# Ignore 'bashrc' for non-interactive shells
case $- in
*i*)
;;
*)
return
;;
esac
if [[ -n "$MYBASH_HOME" ]]; then
alias mybash='cd "${MYBASH_HOME}"'
# Load mybash functions
if [[ "$mybash_loaded" -eq 0 ]]; then
source "$MYBASH_HOME/function_scripts/mybash.bash"
fi
if [[ "$mybash_loaded" -eq 0 ]]; then
echo "Script 'mybash.bash' could not be loaded!"
echo "MyBash not correctly installed!"
return
fi
# Load mybash configuration
eval "$(cat "$MYBASH_HOME/mybashrc")"
[[ -s "$HOME/.mybashrc" ]] && eval "$(cat "$HOME/.mybashrc")"
# Source defined 'bash' scripts
sourceMyBashScripts 'bashrc' "$MYBASH_BASHRC"
# Source additional custom bashrc script
sourceScript "$HOME/.my.bashrc"
fi
MYBASH_LOADED_BASHRC=1
export MYBASH_LOADED_BASHRC
#echo "END MYBASH 'bashrc'"