From 23357137da2d5dcf6d2fbc523a7bc45950e3b609 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 20:26:15 +0200 Subject: Create ~/.var/opt and move ~/.var/{element,signal,wire} into ~/.var/opt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- element-desktop/Makefile | 8 ++++---- element-desktop/bash-aliases | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'element-desktop') diff --git a/element-desktop/Makefile b/element-desktop/Makefile index 90f12d9..60a7a78 100644 --- a/element-desktop/Makefile +++ b/element-desktop/Makefile @@ -2,10 +2,10 @@ include ../common.mk install: - test -f ~/.var/element/ElementCrypt.img - test -f ~/.var/element/ElementCrypt.key - mkdir -p -- ~/.var/element/ElementCrypt.d - test -e ~/.config/Element || ln -sf -- ../.var/element/ElementCrypt.d/Element ~/.config/Element + test -f ~/.var/opt/element/ElementCrypt.img + test -f ~/.var/opt/element/ElementCrypt.key + mkdir -p -- ~/.var/opt/element/ElementCrypt.d + test -e ~/.config/Element || ln -sf -- ../.var/opt/element/ElementCrypt.d/Element ~/.config/Element $(CHECK_INSTALLED) asroot $(CHECK_INSTALLED) gnupg $(CHECK_INSTALLED) cryptsetup diff --git a/element-desktop/bash-aliases b/element-desktop/bash-aliases index 5eada3e..5689df2 100644 --- a/element-desktop/bash-aliases +++ b/element-desktop/bash-aliases @@ -1,8 +1,8 @@ # -*- shell-script -*- mount-element () { - gpg --decrypt ~/.var/element/ElementCrypt.key | \ - asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" ELEMENT_DIR=~/.var/element sh -ec ' + gpg --decrypt ~/.var/opt/element/ElementCrypt.key | \ + asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" ELEMENT_DIR=~/.var/opt/element sh -ec ' device="$(losetup --show -f -P "${ELEMENT_DIR}/ElementCrypt.img")" printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/ElementCrypt" cryptsetup -d - open "${device}" ElementCrypt @@ -11,7 +11,7 @@ mount-element () { } umount-element () { - asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" ELEMENT_DIR=~/.var/element sh -c ' + asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" ELEMENT_DIR=~/.var/opt/element sh -c ' umount "${ELEMENT_DIR}/ElementCrypt.d" cryptsetup close ElementCrypt losetup --detach "$(cat -- "${XDG_RUNTIME_DIR}/ElementCrypt")" -- cgit v1.2.3-70-g09d2