From cd97c5e46af49c05f9c21fd9b75d11c8c2cefb21 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sun, 2 Aug 2020 09:23:41 +0200 Subject: [PATCH] added auto yes answer --- bin/initDesktop | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/initDesktop b/bin/initDesktop index 350e08b..159464f 100755 --- a/bin/initDesktop +++ b/bin/initDesktop @@ -2,6 +2,8 @@ # Set up my desktop/laptop with all default setttings that I want. # # uses salt-call masterless configuration. +# +# to auto answer YES set the INITDESKTOP_YES=1 environment variable DOTFILES_REPO="$HOME/.dotfiles" DOTFILES_REMOTE="https://git.rre.nu:443/jonas/dotfiles.git" @@ -11,6 +13,9 @@ DOTFILES_REMOTE="https://git.rre.nu:443/jonas/dotfiles.git" set -aeo pipefail function asktobreak(){ + if [[ "$INITDESKTOP_YES" == 1 ]];then + return 1 + fi printf "Do you want to run this step (y/n)" while read -r -n 1 -s answer; do if [[ $answer == [YyNn] ]];then