You will only see the public (readable) repos here until you login.
Browse Source

Mv back backup of custom_component if neccessary

Joachim M. Giæver 1 month ago
parent
commit
cc112378ac
1 changed files with 8 additions and 2 deletions
  1. 8 2
      scripts/hooks/post-refresh

+ 8 - 2
scripts/hooks/post-refresh

@@ -5,8 +5,14 @@ logger "Running post-refresh ${SNAP_NAME} (uuid: ${UUID})"
 
 logger "Running config test"
 set -e
-# CC="${SNAP_DATA}/custom_components"
-# CCT="${SNAP_DATA}/.custom_components"
+CC="${SNAP_DATA}/custom_components"
+CCT="${SNAP_DATA}/.custom_components"
+
+if [ -d "${CCT}" ]; then
+    if [ ! -d "${CC}" ]; then
+        mv "${CCT}" "${CC}"
+    fi
+fi
 #
 # if [ -d "${CC}" ]; then
 #     logger "Disabling custom components"