39 lines
776 B
Bash
Executable file
39 lines
776 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
# Ask for the administrator password upfront
|
|
sudo -v
|
|
|
|
# Keep-alive: update existing `sudo` time stamp until script is done
|
|
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
|
|
|
cd ~/.dotfiles
|
|
echo "Updating ALL the things!"
|
|
|
|
# Update these scripts!
|
|
echo-g "==> Updating dotfiles"
|
|
git pull
|
|
|
|
# Updating the system with it's package manager (brew, apt-get, etc.)
|
|
echo-g "==> Updating installed packages"
|
|
pkg-update
|
|
|
|
if command_exists zsh; then
|
|
echo-g "==> Updating zsh, rvm and vim"
|
|
# Then the rest
|
|
install/zsh
|
|
echo
|
|
fi
|
|
|
|
# Only update rvm is it is installed
|
|
if is_mac && command_exists rvm; then
|
|
install/rvm
|
|
echo
|
|
fi
|
|
|
|
# Update vim if it exists
|
|
if [ -d ~/.vim ]; then
|
|
install/vim
|
|
fi
|
|
|
|
echo-g "==> All done!"
|