2023-01-12 10:50:06 -08:00
|
|
|
{{- if (ne .host.distro.family "windows") -}}
|
2023-01-14 03:08:50 -08:00
|
|
|
#!/usr/bin/env -S bash -i
|
2023-01-12 10:50:06 -08:00
|
|
|
|
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
|
|
|
|
2023-01-12 11:13:58 -08:00
|
|
|
### Ensure Powerline is installed
|
|
|
|
if ! command -v powerline > /dev/null; then
|
|
|
|
install-software powerline
|
|
|
|
fi
|
|
|
|
|
2023-01-12 10:50:06 -08:00
|
|
|
### Bash-it completions / plugins
|
2023-01-12 15:59:23 -08:00
|
|
|
if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then
|
2023-01-12 15:47:12 -08:00
|
|
|
logg info 'Running `source ~/.bashrc`'
|
2023-01-12 12:54:19 -08:00
|
|
|
source ~/.bashrc
|
2023-01-12 15:47:12 -08:00
|
|
|
logg success 'Imported the `~/.bashrc` profile'
|
2023-01-12 11:13:58 -08:00
|
|
|
if command -v bash-it > /dev/null; then
|
|
|
|
if [ -n "$BASH_IT" ]; then
|
|
|
|
cd "$BASH_IT" || logg warn "The $BASH_IT directory does not exist"
|
|
|
|
logg info 'Enabling bash-it completions'
|
|
|
|
yes | bash-it enable completion defaults dirs docker docker-compose export git makefile ng npm ssh system vagrant
|
|
|
|
logg info 'Enabling bash-it plugins'
|
|
|
|
yes | bash-it enable plugin base blesh browser cht-sh dirs gitstatus powerline sudo xterm
|
2023-03-27 00:03:32 -07:00
|
|
|
logg info 'Finished enabling bash-it functions'
|
2023-01-12 11:13:58 -08:00
|
|
|
else
|
|
|
|
logg warn 'The BASH_IT variable needs to be defined'
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
logg warn '`bash-it` is not available'
|
|
|
|
fi
|
|
|
|
else
|
2023-01-12 15:59:23 -08:00
|
|
|
if ! command -v powerline > /dev/null; then
|
|
|
|
logg warn '`powerline` is not available'
|
|
|
|
else
|
|
|
|
logg warn '`~/.bashrc` is missing'
|
|
|
|
fi
|
2023-01-12 10:50:06 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
{{ end -}}
|