From c1b82c1353a4813ed8ddd1cfe95404131acb0609 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 19:14:42 +0200 Subject: Fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- element-desktop/Makefile | 2 +- element-desktop/bash-aliases | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'element-desktop') diff --git a/element-desktop/Makefile b/element-desktop/Makefile index 6426e83..90f12d9 100644 --- a/element-desktop/Makefile +++ b/element-desktop/Makefile @@ -5,7 +5,7 @@ install: test -f ~/.var/element/ElementCrypt.img test -f ~/.var/element/ElementCrypt.key mkdir -p -- ~/.var/element/ElementCrypt.d - test -e ~/.config/Element || ln -s -- ../.var/element/ElementCrypt.d/Element ~/.config/Element + test -e ~/.config/Element || ln -sf -- ../.var/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 b58dfbd..5eada3e 100644 --- a/element-desktop/bash-aliases +++ b/element-desktop/bash-aliases @@ -1,10 +1,11 @@ # -*- shell-script -*- mount-element () { + gpg --decrypt ~/.var/element/ElementCrypt.key | \ asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" ELEMENT_DIR=~/.var/element sh -ec ' device="$(losetup --show -f -P "${ELEMENT_DIR}/ElementCrypt.img")" printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/ElementCrypt" - gpg --decrypt "${ELEMENT_DIR}/ElementCrypt.key" | cryptsetup -d - open "${device}" ElementCrypt + cryptsetup -d - open "${device}" ElementCrypt mount /dev/mapper/ElementCrypt "${ELEMENT_DIR}/ElementCrypt.d" ' } -- cgit v1.2.3-70-g09d2