diff options
Diffstat (limited to 'bash/aliases-Zenith')
-rw-r--r-- | bash/aliases-Zenith | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/aliases-Zenith b/bash/aliases-Zenith index 419de1d..73db885 100644 --- a/bash/aliases-Zenith +++ b/bash/aliases-Zenith @@ -1,10 +1,11 @@ # -*- shell-script -*- mount-crypt () { + gpg --decrypt /media/Secondary/.crypt/crypt.key | \ asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" CRYPT_DIR=~/Crypt sh -ec ' device="$(losetup --show -f -P /media/Secondary/.crypt/crypt.img)" printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/CryptCrypt" - gpg --decrypt /media/Secondary/.crypt/crypt.key | cryptsetup -d - open "${device}" CryptCrypt + cryptsetup -d - open "${device}" CryptCrypt mkdir -p "${CRYPT_DIR}" mount /dev/mapper/CryptCrypt "${CRYPT_DIR}" ' |