From 0c7bb6102524e65c6ccd306c8abacc568e508fe2 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 29 Mar 2017 19:04:53 +0200 Subject: [PATCH] init config file only if not existing --- bootstrap.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 819db99..3f26580 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -3,14 +3,16 @@ # Copyright (c) 2017, deadc0de6 fold="dotfiles" +conf="config.yaml" # copy dotdrop entry point cat dotdrop/dotdrop.sh | sed 's#${cur}/dotdrop/dotdrop.py#${cur}/dotdrop/dotdrop/dotdrop.py#g' > dotdrop.sh chmod +x dotdrop.sh mkdir $fold -# init config file -cat << EOF > config.yaml +if [ ! -e ${conf} ]; then + # init config file + cat << EOF > ${conf} config: backup: true create: true @@ -18,3 +20,4 @@ config: dotfiles: profiles: EOF +fi