mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-16 09:28:20 +01:00
Update 19-json_repair.sh
This commit is contained in:
@@ -26,7 +26,7 @@ if [ -f ${JSONTOCHECK} ]; then
|
||||
KEYSTHERE=$(jq "has(\"${KEYS}\")" ${JSONTOCHECK})
|
||||
if [ $KEYSTHERE != "true" ]; then
|
||||
#Fetch initial value
|
||||
JSONSOURCEVALUE=$(jq -r .${KEYS} ${JSONSOURCE})
|
||||
JSONSOURCEVALUE=$(jq -r ".\"$KEYS\"" ${JSONSOURCE})
|
||||
#Add key
|
||||
sed -i "3 i\"${KEYS}\": \"${JSONSOURCEVALUE}\"}," ${JSONTOCHECK}
|
||||
# Message
|
||||
|
||||
Reference in New Issue
Block a user