浏览代码

Update reference to rootDir in .ext-dir

Joachim M. Giæver 3 年之前
父节点
当前提交
64bb7fce43
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/hooks/post-refresh

+ 3 - 1
src/hooks/post-refresh

@@ -14,8 +14,10 @@ test_default_config
 
 # Update deviceConfigPriorityDir to match new revision
 PRIORITY_DIR=$(echo "$(sed -E "s#$(dirname ${SNAP_DATA})/(current|[0-9]+)#${SNAP_DATA}#g" <<< $(cat "${SNAP_DATA}/settings.json" | jq '.zwave.deviceConfigPriorityDir'))" | tr -d '"')
-
 if [ -d $(dirname "${PRIORITY_DIR}") ]; then
     jq --arg deviceConfigPriorityDir ${PRIORITY_DIR} '.zwave.deviceConfigPriorityDir = $deviceConfigPriorityDir' $SNAP_DATA/settings.json > $SNAP_DATA/tmp.json
     mv $SNAP_DATA/tmp.json $SNAP_DATA/settings.json
 fi
+
+# Update references to the external config directory
+sed -iE "s#$(dirname ${SNAP_DATA})/(current|[0-9]+)#${SNAP_DATA}/#g" $ZWAVEJS_EXTERNAL_CONFIG/devices/index.json