diff --git a/git_pull/config.json b/git_pull/config.json index 3b89992..065e7e2 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -1,6 +1,6 @@ { "name": "GIT pull", - "version": "0.1", + "version": "0.2", "slug": "git_pull", "description": "Simple git pull to update local config.", "url": "https://home-assistant.io/addons/git_pull/", diff --git a/git_pull/run.sh b/git_pull/run.sh index 7891112..12b8480 100644 --- a/git_pull/run.sh +++ b/git_pull/run.sh @@ -11,7 +11,7 @@ REPEAT_INTERVAL=$(jq --raw-output '.repeat.interval' $CONFIG_PATH) # init config repositorie if [ ! -d /config/.git ]; then echo "[Info] cleanup config folder and clone from repositorie" - rm -rf /config/* + rm -rf /config/.[!.]* /config/* 2&> /dev/null if ! git clone "$REPOSITORIE" /config 2&> /dev/null; then echo "[Error] can't clone $REPOSITORIE into /config"