aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc-linux-desktop14
1 files changed, 14 insertions, 0 deletions
diff --git a/.zshrc-linux-desktop b/.zshrc-linux-desktop
index 3b717a4..5b1e593 100644
--- a/.zshrc-linux-desktop
+++ b/.zshrc-linux-desktop
@@ -22,3 +22,17 @@ if [[ $(whence timew) != "" ]] then
alias tt='timew track'
alias tu='timew undo'
fi
+
+if [[ -f $HOME/mount/enc.iso && $(whence cryptsetup) ]] then
+emount() {
+ mkdir -p $HOME/enc || return 1
+ sudo cryptsetup luksOpen $HOME/mount/enc.iso enc || { rmdir $HOME/enc; return 1 }
+ sudo mount /dev/mapper/enc $HOME/enc || { sudo cryptsetup luksClose enc; rmdir $HOME/enc; return 1 }
+}
+
+eumount() {
+ [[ -d $HOME/enc ]] && sudo umount $HOME/enc
+ sudo cryptsetup luksClose enc
+ [[ -d $HOME/enc ]] && rmdir $HOME/enc
+}
+fi