mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 9d2918e4144e065b87d65609bbb434c0e8908233
parent 456febd7c9685473931ccd2bb4a9da4ebcd0a067
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed,  9 Nov 2016 00:18:43 +0100

create folder if not exists

Diffstat:
luks_mount | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/luks_mount b/luks_mount @@ -3,8 +3,10 @@ set -e VOLUME="$1" -KEY="$HOME/credentials/$VOLUME.key" +KEY="$HOME/credentials/$VOLUME.key" +FOLDER="/mnt/$VOLUME" sudo cryptsetup luksOpen --key-file "$KEY" $(duuid "$VOLUME") "$VOLUME" -sudo mount "/dev/mapper/$VOLUME" "/mnt/$VOLUME" +sudo mkdir -p "$FOLDER" +sudo mount "/dev/mapper/$VOLUME" "$FOLDER"