2022-12-01 20:53:42 -08:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
### MOTD
|
|
|
|
# Add file named .hushlogin in the user's home directory to disable the MOTD
|
|
|
|
if [ "$BASH_SUPPORT" = 'true' ] && [ ! -f ~/.hushlogin ] && [ "$SHLVL" -eq 1 ]; then
|
2022-11-22 09:55:29 -08:00
|
|
|
if [ -f "$HOME/.local/scripts/motd.bash" ] && { [ -n "$SSH_CONNECTION" ] && [[ $- == *i* ]]; } || command -v qubes-vmexec > /dev/null || command -v qubes-dom0-update > /dev/null || { [ -d /Applications ] && [ -d /System ]; }; then
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
if { [ -z "$MOTD" ] || [ "$MOTD" -ne 0 ]; } && [[ "$(hostname)" != *'-minimal' ]]; then
|
2022-11-22 09:55:29 -08:00
|
|
|
. "$HOME/.local/scripts/motd.bash"
|
Update dotfiles/.local/share/chezmoi/private_dot_config/Brewfile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/fd/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/ignore, dotfiles/.local/share/chezmoi/private_dot_config/git/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/k9s/plugin.yml, dotfiles/.local/share/chezmoi/private_dot_config/shell/aliases, dotfiles/.local/share/chezmoi/private_dot_config/shell/functions, dotfiles/.local/share/chezmoi/private_dot_config/shell/exports.sh, dotfiles/.local/share/chezmoi/private_dot_config/asdf/default-npm-packages, dotfiles/.profile, dotfiles/.local/share/chezmoi/private_dot_config/shell/motd, dotfiles/.bash_profile, dotfiles/.bashrc, dotfiles/.zshrc, dotfiles/.local/share/chezmoi/private_dot_config/ripgrep/config, dotfiles/.local/share/chezmoi/private_dot_config/readline/inputrc, dotfiles/.local/share/chezmoi/private_dot_config/pg/.gitkeep, dotfiles/.local/share/chezmoi/private_dot_config/putty/.gitkeep, dotfiles/.npmrc, dotfiles/.local/share/chezmoi/private_dot_config/npm/npmrc.tmpl, dotfiles/.local/share/chezmoi/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/dot_vim/vimrc, dotfiles/.local/share/chezmoi/dot_profile.tmpl
2022-11-21 20:00:41 -08:00
|
|
|
# TODO - -- services
|
|
|
|
if [ -n "$SSH_CONNECTION" ]; then
|
|
|
|
# SSH
|
|
|
|
bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login
|
|
|
|
elif command -v qubes-vmexec > /dev/null; then
|
|
|
|
# Qubes AppVM
|
|
|
|
bash_motd --banner --memory --diskspace --docker --updates
|
|
|
|
elif command -v qubes-dom0-update > /dev/null; then
|
|
|
|
# Qubes dom0
|
|
|
|
bash_motd --banner --updates
|
|
|
|
elif [ -d /Applications ] && [ -d /System ]; then
|
|
|
|
# macOS
|
|
|
|
bash_motd --banner
|
|
|
|
else
|
|
|
|
bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|