From a74a3063be3a86c630afe5ab9f17e050c0db6c08 Mon Sep 17 00:00:00 2001 From: Philip Henning Date: Fri, 28 Dec 2018 13:25:21 +0100 Subject: [PATCH] Add message for wrong mount points --- dotfiles/bin/mount_c3voc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotfiles/bin/mount_c3voc b/dotfiles/bin/mount_c3voc index 8df0588..d129b12 100755 --- a/dotfiles/bin/mount_c3voc +++ b/dotfiles/bin/mount_c3voc @@ -9,12 +9,13 @@ if [[ $UID -ne 0 ]]; then exit 1 fi +options=( storage aws ) + if [[ -z "$1" ]]; then echo "Usage: $0 " echo "e.g.: $0 c3" echo " " echo "Valid options:" - options=( storage aws ) for i in "${options[@]}"; do echo " - $i" done @@ -40,4 +41,10 @@ case $1 in mount.cifs //aws.lan.c3voc.de/fuse $fuse -o rw,guest -o uid=phg mount.cifs //aws.lan.c3voc.de/video $video -o rw,guest -o uid=phg ;; + *) + echo "Mountpoint does not exist." + echo "Please use one of the following:" + for i in "${options[@]}"; do + echo " - $i" + done esac