diff --git a/bin/update b/bin/update index d75ef1e9..de5fbc2f 100755 --- a/bin/update +++ b/bin/update @@ -1,8 +1,11 @@ #!/bin/zsh -# Ask for the password up front +# 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!" diff --git a/deploy b/deploy index b93ea7c3..5d040004 100755 --- a/deploy +++ b/deploy @@ -2,6 +2,12 @@ INSTALL_DIR="$HOME/.dotfiles" +# 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 & + ##### GIT & DOTFILES ###### # If the install folder doesn't exist, you bash < <(curl ...)'d this script! if [ ! -d "$INSTALL_DIR" ]; then