From 5907605fcfa68c8acd749d45008649539d74b4ce Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:54:55 +0800 Subject: update --- tools/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 1969c9a..8acbbdd 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -8,10 +8,12 @@ REPO=${REPO:-typebrook/settings} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} -git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { - error "git clone of settings repo failed" - exit 1 -} +if [[ -d $SETTING_DIR ]]; then + git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { + error "git clone of settings repo failed" + exit 1 + } +fi sed "/^# $REPO/, /^$/ d" cat <