mirror of
https://github.com/aljazceru/addons.git
synced 2026-02-06 13:44:21 +01:00
Rename all keys & consts from repositorie to repository (#173)
* Change key repositorie to repository Patch bump version * Change const REPOSITORIE to REPOSITORY * Correct the key interpolation from /data/options.json * Pump version for config changes * Update config
This commit is contained in:
committed by
Pascal Vizeli
parent
0c1718e51c
commit
579d2168df
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"name": "Git pull",
|
||||
"version": "0.3",
|
||||
"version": "1.0",
|
||||
"slug": "git_pull",
|
||||
"description": "Simple git pull to update the local configuration",
|
||||
"url": "https://home-assistant.io/addons/git_pull/",
|
||||
"startup": "services",
|
||||
"boot": "manual",
|
||||
"hassio_api": true,
|
||||
"map": ["config:rw"],
|
||||
"options": {
|
||||
"repositorie": null,
|
||||
"repository": null,
|
||||
"auto_restart": false,
|
||||
"repeat": {
|
||||
"active": false,
|
||||
@@ -16,7 +17,7 @@
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"repositorie": "url",
|
||||
"repository": "url",
|
||||
"auto_restart": "bool",
|
||||
"repeat": {
|
||||
"active": "bool",
|
||||
|
||||
@@ -3,7 +3,7 @@ set -e
|
||||
|
||||
CONFIG_PATH=/data/options.json
|
||||
|
||||
REPOSITORIE=$(jq --raw-output '.repositorie' $CONFIG_PATH)
|
||||
REPOSITORY=$(jq --raw-output '.repository' $CONFIG_PATH)
|
||||
AUTO_RESTART=$(jq --raw-output '.auto_restart' $CONFIG_PATH)
|
||||
REPEAT_ACTIVE=$(jq --raw-output '.repeat.active' $CONFIG_PATH)
|
||||
REPEAT_INTERVAL=$(jq --raw-output '.repeat.interval' $CONFIG_PATH)
|
||||
@@ -13,8 +13,8 @@ if [ ! -d /config/.git ]; then
|
||||
echo "[Info] cleanup config folder and clone from repositorie"
|
||||
rm -rf /config/.[!.]* /config/* 2&> /dev/null
|
||||
|
||||
if ! git clone "$REPOSITORIE" /config 2&> /dev/null; then
|
||||
echo "[Error] can't clone $REPOSITORIE into /config"
|
||||
if ! git clone "$REPOSITORY" /config 2&> /dev/null; then
|
||||
echo "[Error] can't clone $REPOSITORY into /config"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
cd /config
|
||||
while true; do
|
||||
|
||||
echo "[Info] pull from $REPOSITORIE"
|
||||
echo "[Info] pull from $REPOSITORY"
|
||||
git pull 2&> /dev/null || true
|
||||
|
||||
if [ "$AUTO_RESTART" == "true" ]; then
|
||||
|
||||
Reference in New Issue
Block a user