aboutsummaryrefslogtreecommitdiffstats
path: root/element-desktop/bash-aliases
diff options
context:
space:
mode:
Diffstat (limited to 'element-desktop/bash-aliases')
-rw-r--r--element-desktop/bash-aliases3
1 files changed, 2 insertions, 1 deletions
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"
'
}