-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbash_config
134 lines (114 loc) · 3.71 KB
/
bash_config
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/bin/bash
platform='unknown'
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='osx'
fi
# bash_config
if [[ $platform == 'osx' ]]; then
export VISUAL='mvim -f' # Make MacVim the visual editor
export EDITOR="vim" # Make vim the default editor
# make ls display colors, reinforce with CLICOLOR and LSCOLORS
export CLICOLOR=1
# LSCOLORS order: DIR, SYM_LINK, SOCKET, PIPE, EXE, BLOCK_SP
# CHAR_SP, EXE_SUID, EXE_GUID, DIR_STICKY, DIR_WO_STICKY
# a = black, b = red, c = green, d = brown, e = blue,
# f = magenta g = cyan, h = light gray, x = default
# lowercase is bold
export LSCOLORS=ExFxBxDxCxegedabagacEx
MKL_NUM_THREADS=1
export MKL_NUM_THREADS
# source `brew --prefix`/Library/Contributions/brew_bash_completion.sh
# source $(brew --prefix)/etc/bash_completion.d/brew
# source $(brew --prefix)/etc/bash_completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi
#ssh-add -A
#export GIT_EXTERNAL_DIFF=/Users/asoto/bin/gitdfdiff.sh
elif [[ $platform == 'linux' ]]; then
export EDITOR="vi" # Make vim the default editor
# make ls display colors, reinforce with CLICOLOR and LSCOLORS
export CLICOLOR=1
# LSCOLORS order: DIR, SYM_LINK, SOCKET, PIPE, EXE, BLOCK_SP
# CHAR_SP, EXE_SUID, EXE_GUID, DIR_STICKY, DIR_WO_STICKY
# a = black, b = red, c = green, d = brown, e = blue,
# f = magenta g = cyan, h = light gray, x = default
# lowercase is bold
export LSCOLORS=ExFxBxDxCxegedabagacad
MKL_NUM_THREADS=1
export MKL_NUM_THREADS
# Define the GRADS script folder
export GASCRP=$HOME/bighorn
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT $SSHAGENTARGS`
trap "kill $SSH_AGENT_PID" 0
fi
# The following exports are for the Titan mesoscale WRF.
export HDF5LIB_fOR_NETCDF=/usr/local;
export NETCDF=/usr/local;
export WRFIO_NCD_LARGE_FILE_SUPPORT=1;
#export JASPERLIB=/usr/lib64;
#export JASPERINC=/usr/include/jasper;
export WRF_CHEM=0;
export WRF_KPP=0;
export WRF_TITAN=0;
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
# env=~/.ssh/agent.env
#
# # Note: Don't bother checking SSH_AGENT_PID. It's not used
# # by SSH itself, and it might even be incorrect
# # (for example, when using agent-forwarding over SSH).
#
# agent_is_running() {
# if [ "$SSH_AUTH_SOCK" ]; then
# # ssh-add returns:
# #0 = agent running, has keys
# # 1 = agent running, no keys
# #2 = agent not running
# ssh-add -l >/dev/null 2>&1 || [ $? -eq 1 ]
# else
# false
# fi
# }
#
# agent_has_keys() {
# ssh-add -l >/dev/null 2>&1
# }
#
# agent_load_env() {
# . "$env" >/dev/null
# }
#
# agent_start() {
# (umask 077; ssh-agent >"$env")
# . "$env" >/dev/null
# }
#
# if ! agent_is_running; then
# agent_load_env
# fi
#
# # if your keys are not stored in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub, you'll
# # n eed
# # to paste the proper path after ssh-add
# if ! agent_is_running; then
# agent_start
# ssh-add
# elif ! agent_has_keys; then
# ssh-add
# fi
#
# unset env
fi