2019-08-18 06:26:48 -07:00
|
|
|
#!/usr/bin/env fish
|
2019-07-24 22:36:09 -07:00
|
|
|
|
|
|
|
# launch tmux if we're in an interactive terminal emulator
|
2019-08-05 16:11:41 -07:00
|
|
|
if status is-interactive && not status is-login && test -z "$TMUX"
|
2019-07-05 19:09:01 -07:00
|
|
|
exec tmux new-session
|
2019-06-10 19:16:40 -07:00
|
|
|
end
|
|
|
|
|
2019-07-24 22:36:09 -07:00
|
|
|
# bootstrapping information
|
2019-07-29 03:35:19 -07:00
|
|
|
# required universal variables:
|
|
|
|
# - _agw_dir_bin = volatile binary storage
|
|
|
|
# - _agw_dir_rc = the directory holding this repository
|
|
|
|
# - _agw_dir_scripts = the directory for user-facing scripts
|
|
|
|
# - _agw_dir_src = non-volatile source code storage
|
2019-07-24 22:36:09 -07:00
|
|
|
switch (uname)
|
|
|
|
case Linux
|
|
|
|
set -gx CC clang
|
|
|
|
set -gx CXX clang++
|
2019-07-29 03:35:19 -07:00
|
|
|
set -gx GOPATH ~/go
|
2019-07-29 05:53:59 -07:00
|
|
|
set -gx RIPGREP_CONFIG_PATH ~/.config/ripgreprc
|
2019-07-24 22:36:09 -07:00
|
|
|
set -Ux _agw_dir_bin ~/bin
|
2019-08-05 19:20:58 -07:00
|
|
|
set -Ux _agw_dir_rc ~/rc
|
|
|
|
set -Ux _agw_dir_scripts ~/rc/scripts
|
2019-07-24 22:36:09 -07:00
|
|
|
set -Ux _agw_dir_src ~/src
|
|
|
|
case Darwin
|
|
|
|
set -gx CMAKE_PREFIX_PATH /usr/local/opt/qt/
|
2019-07-27 05:32:46 -07:00
|
|
|
set -gx CPPFLAGS "-I/usr/local/opt/ruby/include"
|
2019-07-24 22:36:09 -07:00
|
|
|
set -gx DISTCC_HOSTS "192.168.1.2,cpp"
|
|
|
|
set -gx LDFLAGS "-L/usr/local/opt/ruby/lib"
|
2019-07-27 05:32:46 -07:00
|
|
|
set -gx fish_user_paths "/usr/local/opt/ruby/bin" $fish_user_paths
|
2019-07-24 22:36:09 -07:00
|
|
|
set -Ux _agw_dir_bin ~/Binaries
|
|
|
|
set -Ux _agw_dir_rc ~/Sources/scripts
|
|
|
|
set -Ux _agw_dir_scripts ~/Scripts
|
|
|
|
set -Ux _agw_dir_src ~/Sources
|
2019-08-05 16:11:41 -07:00
|
|
|
case NetBSD
|
2019-08-05 17:00:09 -07:00
|
|
|
# Yes, these are *actually* needed.
|
|
|
|
set -gx CC cc
|
|
|
|
set -gx CXX c++
|
2019-08-05 16:33:45 -07:00
|
|
|
set -gx PATH $HOME/bin \
|
|
|
|
/usr/pkg/gcc8/bin \
|
|
|
|
/sbin \
|
|
|
|
/usr/sbin \
|
|
|
|
/bin \
|
|
|
|
/usr/bin \
|
|
|
|
/usr/pkg/sbin \
|
|
|
|
/usr/pkg/bin \
|
|
|
|
/usr/X11R7/bin \
|
|
|
|
/usr/games \
|
|
|
|
/usr/local/bin \
|
2019-08-05 16:17:38 -07:00
|
|
|
/usr/local/sbin
|
2019-08-05 16:33:45 -07:00
|
|
|
set -gx PKG_PATH "http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/"(uname -p)"/"(uname -r|cut -f '1 2' -d.|cut -f 1 -d_)"/All"
|
2019-08-05 16:11:41 -07:00
|
|
|
set -Ux _agw_dir_bin ~/bin
|
|
|
|
set -Ux _agw_dir_rc ~/rc
|
|
|
|
set -Ux _agw_dir_scripts ~/rc/scripts
|
|
|
|
set -Ux _agw_dir_src ~/src
|
|
|
|
case \*
|
|
|
|
echo (set_color red)"This platform is not configured!"
|
2019-06-28 17:33:53 -07:00
|
|
|
end
|
2019-06-18 09:13:09 -07:00
|
|
|
|
2019-07-24 22:36:09 -07:00
|
|
|
# execute scripts
|
2019-06-28 17:35:31 -07:00
|
|
|
if test -f ~/.cargo/env
|
2019-07-05 19:09:01 -07:00
|
|
|
source ~/.cargo/env
|
2019-06-28 17:35:31 -07:00
|
|
|
end
|
|
|
|
|
2019-07-27 05:30:14 -07:00
|
|
|
for f in (find $_agw_dir_scripts/fish -type f)
|
2019-07-24 22:36:09 -07:00
|
|
|
source $f
|
|
|
|
end
|
|
|
|
|
2019-06-10 19:16:40 -07:00
|
|
|
## EOF
|