diff options
author | Mattias Andrée <maandree@kth.se> | 2021-07-15 08:59:40 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-07-15 08:59:40 +0200 |
commit | 1ecf724ca51550b8149b1bde59f9022db61b8fc2 (patch) | |
tree | a9edfe6627ef63a116676ca3e228b18047a53f67 | |
parent | m (diff) | |
download | dotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.gz dotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.bz2 dotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-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}" ' |