-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_profile
More file actions
executable file
·208 lines (170 loc) · 4.96 KB
/
Copy path_profile
File metadata and controls
executable file
·208 lines (170 loc) · 4.96 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#!/bin/bash
#
env -i
ECHO=echo
function sourceIfPresent
{
file="$1"
if [ -s "$file" ]
then
echo "sourcing shared file $file"
source "$file"
fi
}
function dotIfPresent
{
file=$1
if [ -s "$file" ]
then
echo "dotting shared file $file"
. "$file"
fi
}
sourceIfPresent "$HOME/.shell.functions"
Setenv GIT_ROOT ~/Projects/GitRepo
Setenv ASTRO_IMAGE_ROOT /Volumes/Astrophotography/AstroImages
# Figure out if this is a dropbox or home setup
#
pathToProfile=$(readlink ~/.profile)
Setenv UNIX_ENV_DIR $(dirname $pathToProfile)
# This is causing problems, need to rething it
#
#checkUpToDate
#####################################################
# Environment Variables
#####################################################
Setenv BASH_SILENCE_DEPRECATION_WARNING 1
Setenv USER $(whoami)
Setenv EDITOR emacs
Setenv PAGER less
Setenv BLOCKSIZE 1k
Setenv PGHOST localhost
# This one is for tar and osx files
#
Setenv COPYFILE_DISABLE true
# append to the history file, don't overwrite it
#
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
#
Setenv HISTCONTROL ignoredups:erasedups
Setenv HISTSIZE 10000
Setenv HISTFILESIZE 20000
Setenv HISTIGNORE 'bg:fg:history'
# Not sure this one is needed
#
Setenv HISTTIMEFORMAT "%X "
shopt -s cmdhist
Setenv PATH "."
AddpathIfPresent ~/Dropbox/bin
AddpathIfPresent /snap/bin
AddpathIfPresent ~/Dropbox/StreamDeckScripts
AddpathIfPresent ~/Dropbox/findgrep
AddpathIfPresent ~/bin/findgrep
AddpathIfPresent ~/Dropbox/GitRepo/astrophotography/automation
AddpathIfPresent $GIT_ROOT/product-marketing/utilities
Addpath ${UNIX_ENV_DIR}/bin
command -v brew > /dev/null 2>&1 && eval "$(brew shellenv)"
Addpath ~/bin
AddpathIfPresent /usr/local/bin
AddpathIfPresent /opt/homebrew/bin
AddpathIfPresent /usr/local/sbin
AddpathIfPresent $HOME/.local/bin
AddpathIfPresent $HOME/.rd/bin
AddpathIfPresent /Applications/Obsidian.app/Contents/MacOS
Addpath /bin
Addpath /usr/bin
Addpath /usr/sbin
Addpath /etc
Addpath /sbin
AddpathIfPresent ~/Library/Python/2.7/bin
AddpathIfPresent /opt/X11/bin
#####################################################
# ManPath Variables
#####################################################
Addman /usr/share/man
#####################################################
# LD_LIBRARY_PATH Variables
#####################################################
# Environment
stty erase ^h
export PROMPT_DIRTRIM=4
export PS1="\[$(tput bold)\]\[\e[7m\]\u@\h\[$(tput sgr0)\][\t]:\[$(tput bold)\]\w \\$ >\[$(tput sgr0)\]\[$(tput sgr0)\]"
set -o emacs
#Make the keyboard cursor keys work
alias __A=""
alias __B=""
alias __C=""
alias __D=""
alias ls="ls -F"
alias l="ls -l"
alias md="mkdir"
alias me="ps -fu $USER"
alias p="more -c"
alias clean="rm *~"
alias h="history"
alias j="jobs"
alias tt="exec tcsh"
alias xsltproc=$SW_HOME/3rdparty/sol/libxslt/1.1.12_64/bin/xsltproc
sourceIfPresent "$HOME/.profile.local"
sourceIfPresent "$HOME/.bashrc.bindkey"
sourceIfPresent "$HOME/.bashrc.alias"
# There's some weirdness going on - can't have this check inside the if.
#
# if hash rbenv 2>/dev/null
# then
# eval "$(rbenv init -)"
# fi
bind "set completion-ignore-case on"
bind "set show-all-if-ambiguous on"
#if [ -f $HOME/.Xdefaults ]
#then
# if [ ! -z $DISPLAY ]
# then
# echo LOADING XDEF> $HOME/log
# xrdb $HOME/.Xdefaults # Load Users X11 resource database
# fi
#fi
sourceIfPresent .amazon_aws
complete -C aws_completer aws
complete -F _ssh vnc
complete -F _scp fastRsync
sourceIfPresent ~/.secrets
sourceIfPresent ~/Dropbox/.secrets.env
sourceIfPresent /etc/bash_completion
sourceIfPresent $HOME/local_bash_completion/docker
sourceIfPresent /usr/share/bash-completion/completions/docker
brewSourceIfPresent etc/profile.d/bash_completion.sh
brewSourceIfPresent etc/bash_completion
brewSourceIfPresent "Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"
sourceIfPresent ~/Projects/GitRepo/snyk-cli-completion/snyk-cli-completion.bash
if [ -d $HOME/go ]
then
SetenvDir GOPATH $HOME/go
SetenvDir GOBIN $GOPATH/bin
AddpathIfPresent $GOBIN
AddpathIfPresent /usr/local/opt/go/libexec/bin
fi
Setenv NVM_DIR "$HOME/.nvm"
sourceIfPresent "$NVM_DIR/nvm.sh"
sourceIfPresent "$NVM_DIR/bash_completion"
# Automatic Version Switching for Node.js
# This never works, but at least you know if it is off
#
sourceIfPresent "$HOME/.avn/bin/avn.sh"
sourceIfPresent "$HOME/.local_env"
# PyEnv
Setenv PYENV_ROOT "$HOME/.pyenv"
if [ -d "$PYENV_ROOT" ]
then
Addpath"$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
# initialize these if the commands are found
#
command -v helm > /dev/null 2>&1 && source <(helm completion bash)
command -v mcfly > /dev/null 2>&1 && eval "$(mcfly init bash)"
command -v direnv > /dev/null 2>&1 && eval "$(direnv hook bash)"
command -v rbenv > /dev/null 2>&1 && eval "$(rbenv init -)"
sourceIfPresent "$HOME/.cargo/env"