Browse Source

added missing hook

Joachim M. Giæver 1 year ago
parent
commit
6193c92371
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/hooks/connect-zui-store

+ 12 - 0
src/hooks/connect-zui-store

@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+ZUI_STORE="${SNAP_COMMON}/zui-store"
+
+if [ ! -d "${ZUI_STORE}" ]; then
+	echo "Missing store-dir for ZUI. Failed, exiting...." >&2
+	exit 1
+fi
+
+if [ $(ls "${ZUI_STORE}" | wc -l) -eq 0 ]; then
+	cpy_2_zui && sudo snap stop "${SNAP_NAME}" && sudo snap disable "${SNAP_NAME}"
+fi