#!/usr/bin/env fish # launch tmux if we're in an interactive terminal emulator if status is-interactive && not status is-login && test -z "$TMUX" exec tmux new-session end # bootstrapping information # 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 switch (uname) case Linux set -gx CC clang set -gx CXX clang++ set -gx GOPATH ~/go set -gx RIPGREP_CONFIG_PATH ~/.config/ripgreprc 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 Darwin set -gx CMAKE_PREFIX_PATH /usr/local/opt/qt/ set -gx CPPFLAGS "-I/usr/local/opt/ruby/include" set -gx DISTCC_HOSTS "192.168.1.2,cpp" set -gx LDFLAGS "-L/usr/local/opt/ruby/lib" set -gx fish_user_paths "/usr/local/opt/ruby/bin" $fish_user_paths 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 case NetBSD # Yes, these are *actually* needed. set -gx CC cc set -gx CXX c++ 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 \ /usr/local/sbin 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" 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!" end # execute scripts if test -f ~/.cargo/env source ~/.cargo/env end for f in (find $_agw_dir_scripts/fish -type f) source $f end ## EOF