mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 21:54:20 +01:00
Bugfix cleanup config folder git (#166)
* Update run.sh * Update config.json
This commit is contained in:
@@ -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/",
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user