Bugfix cleanup config folder git (#166)

* Update run.sh

* Update config.json
This commit is contained in:
Pascal Vizeli
2017-08-04 16:25:42 +02:00
committed by GitHub
parent 16129683cb
commit 03adf26d93
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "GIT pull", "name": "GIT pull",
"version": "0.1", "version": "0.2",
"slug": "git_pull", "slug": "git_pull",
"description": "Simple git pull to update local config.", "description": "Simple git pull to update local config.",
"url": "https://home-assistant.io/addons/git_pull/", "url": "https://home-assistant.io/addons/git_pull/",

View File

@@ -11,7 +11,7 @@ REPEAT_INTERVAL=$(jq --raw-output '.repeat.interval' $CONFIG_PATH)
# init config repositorie # init config repositorie
if [ ! -d /config/.git ]; then if [ ! -d /config/.git ]; then
echo "[Info] cleanup config folder and clone from repositorie" 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 if ! git clone "$REPOSITORIE" /config 2&> /dev/null; then
echo "[Error] can't clone $REPOSITORIE into /config" echo "[Error] can't clone $REPOSITORIE into /config"