connect-plug-zui-store 536 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. export DAEMONIZED=1
  3. source $SNAP/helper/functions
  4. #$SNAP/bin/cpy-2-zui
  5. if snapctl is-connected zui-store; then
  6. ZUI_STORE="${SNAP_COMMON}/zui-store"
  7. lprint "ZUI-store is connected"
  8. if [ "$(ls "${ZUI_STORE}" | wc -l)" -ne 0 ]; then
  9. lprint "ZUI-store (${ZUI_STORE}) is not empty: $(ls "${ZUI_STORE}")"
  10. exit 1
  11. else
  12. lprint "ZUI-store is empty, copying over data: $(ls "${SNAP_DATA}")"
  13. fi
  14. else
  15. lprint "ZUI-store is NOT connected, but why did we end up here then??"
  16. fi
  17. #lprint "Connected ZUI (from: z2m)"
  18. #