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:
|
2019-08-19 06:40:45 -07:00
|
|
|
# - _agw_dir_bin = volatile binary storage
|
|
|
|
# - _agw_dir_rc = the directory holding this repository
|
|
|
|
# - _agw_dir_src = non-volatile source code storage
|
2020-11-15 13:03:33 -08:00
|
|
|
# - _agw_dir_dev = volatile chroot development environment
|
2019-07-24 22:36:09 -07:00
|
|
|
switch (uname)
|
2019-10-25 21:39:51 -07:00
|
|
|
case Linux NetBSD
|
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
|
2019-07-24 22:36:09 -07:00
|
|
|
set -Ux _agw_dir_src ~/src
|
2020-11-15 13:03:33 -08:00
|
|
|
set -Ux _agw_dir_dev ~/dev
|
2019-07-24 22:36:09 -07:00
|
|
|
case Darwin
|
|
|
|
set -Ux _agw_dir_bin ~/Binaries
|
|
|
|
set -Ux _agw_dir_rc ~/Sources/scripts
|
|
|
|
set -Ux _agw_dir_src ~/Sources
|
2020-11-15 13:03:33 -08:00
|
|
|
set -Ux _agw_dir_dev ~/Development
|
2019-08-05 16:11:41 -07:00
|
|
|
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-10-25 21:02:26 -07:00
|
|
|
# per-computer configs go here
|
2019-10-19 10:20:17 -07:00
|
|
|
set -Ux _agw_dir_local $_agw_dir_rc/computers/(hostname)
|
|
|
|
|
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-11-07 04:17:26 -08:00
|
|
|
function _agw_get_autoexec -d "Function for bootstrapping. Finds auto-execs."
|
|
|
|
if test -d $argv[1]
|
|
|
|
find $argv[1] -type f | env LC_ALL=C sort
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
for f in (_agw_get_autoexec $_agw_dir_local/fish) \
|
|
|
|
(_agw_get_autoexec $_agw_dir_rc/fish)
|
2019-07-24 22:36:09 -07:00
|
|
|
source $f
|
|
|
|
end
|
|
|
|
|
2019-06-10 19:16:40 -07:00
|
|
|
## EOF
|