-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserver.sh
43 lines (36 loc) · 1.23 KB
/
server.sh
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
#!/bin/bash
# server-specific config/aliases
# sourced in ~/.bash_ext (which is sourced in ~/.bashrc)
# (structure setup by https://github.com/purarue/bootstrap)
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval "$(ssh-agent)"
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l >/dev/null || {
ssh-add ~/.ssh/github
ssh-add ~/.ssh/id_rsa
}
# super shell completion
complete -F _longopt super
shopt -s autocd
# super aliases
alias sctl='super --ctl'
alias sc=sctl
# glue-server stuff
alias glue_shell="cd ~/code/glue && renv ./production_server --shell"
alias glue_iex="cd ~/code/glue && renv ./production_server --iex"
# language-specific configuration
# node
export NPM_CONFIG_PREFIX="${HOME}/.local/share/npm-packages"
# elixir
export ERL_AFLAGS="-kernel shell_history enabled"
# golang
export GOROOT=/usr/local/go
export GOPATH=$HOME/.local/share/go
export GOBIN=$GOPATH/bin
# update path
# include pyenv 3.11 bin at the front of the path so calling python/pip/python3 uses that
export PATH="/usr/sbin:$HOME/.pyenv/versions/3.11.3/bin:$HOME/.pyenv/bin:$HOME/.cargo/bin:$HOME/vps/bin:$HOME/vps:$HOME/.local/bin:$NPM_CONFIG_PREFIX/bin:$GOBIN:$PATH"
# use asdf for version management
. $HOME/.asdf/asdf.sh