-
Notifications
You must be signed in to change notification settings - Fork 1
/
bashrc
47 lines (38 loc) · 888 Bytes
/
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
#!/bin/bash
export PROFILE="bashrc"
## Check current platform and state
[ -z "$PS1" ] && return
[ "$TERM" = "nuclide" ] && return
function _profile_append {
export PROFILE="$PROFILE:$1"
}
function _debug {
if [[ -n "$DEBUG" ]]; then
echo "$@"
fi
}
# Add to default path
export PATH=/usr/local/bin:"$PATH"
# Setting up Rust env
if [[ -f "$HOME/.cargo/env" ]]; then
source "$HOME/.cargo/env"
fi
# Setting up Homebrew env
if [[ -f /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Setting up ghcup env
if [[ -f "$HOME/.ghcup/env" ]]; then
source "$HOME/.ghcup/env"
fi
## Grab-all for bash files
if [[ -d "$HOME"/.bash.d ]]; then
for file in "$HOME"/.bash.d/*; do
_profile_append "$file"
source "$file"
done
fi
## Happens after everything is setup
if [[ "$OS_PLATFORM" = linux ]]; then
true
fi