Sudo keep-alive
This commit is contained in:
parent
98ef18ce7a
commit
cc01aee4e4
|
@ -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!"
|
||||
|
||||
|
|
6
deploy
6
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
|
||||
|
|
Loading…
Reference in a new issue