From 62bf218d9953b69a89fb0a19deccdd7e5d1ea649 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 3 May 2019 10:20:01 +0200 Subject: [PATCH] Don't ask to clone dotfiles if already done --- tforgione.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tforgione.sh b/tforgione.sh index af1c468..d38d3cf 100755 --- a/tforgione.sh +++ b/tforgione.sh @@ -155,12 +155,14 @@ clone_dotfiles() { } configure_dotfiles() { - yes_no_ask "do you wish to configure the dotfiles ?" - if [ $? -ne 0 ]; then - return - fi + if [ ! -d $HOME/.config/dotfiles ]; then + yes_no_ask "do you wish to configure the dotfiles ?" + if [ $? -ne 0 ]; then + return + fi - clone_dotfiles + clone_dotfiles + fi } configure_shell() {