From eee602c78520daf82cdc3d07ba1723381522394a Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 17 Mar 2024 00:02:25 +0100 Subject: [PATCH] exit while bug --- sshfs-mount | 9 ++++++--- sshfs-umount | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sshfs-mount b/sshfs-mount index f8512e6..482c9dd 100755 --- a/sshfs-mount +++ b/sshfs-mount @@ -27,15 +27,18 @@ main() { } MOUNTBASEDIR=$(realpath ~/Remotes) -TARGET=${1}; while [ ${#} -gt 0 ]; do case ${1} in --help) showHelp; exit 0;; -b | --bastion) BASTION="${2}"; shift; shift;; -d | --mountbase) MOUNTBASEDIR=$(realpath "${2}"); shift; shift;; - *) shift;; + *) + TARGET=${1}; + MOUNTDIR="${MOUNTBASEDIR}/${2}"; + shift + shift + ;; esac done -MOUNTDIR="${MOUNTBASEDIR}/${2}"; main diff --git a/sshfs-umount b/sshfs-umount index 7718ef6..351c488 100755 --- a/sshfs-umount +++ b/sshfs-umount @@ -25,9 +25,11 @@ while [ ${#} -gt 0 ]; do case ${1} in --help) showHelp; exit 0;; -d | --mountbase) MOUNTBASEDIR=$(realpath "${2}"); shift; shift;; - *) shift;; + *) + MOUNTDIR="${MOUNTBASEDIR}/${2}"; + shift + ;; esac done -MOUNTDIR="${MOUNTBASEDIR}/${2}"; main