This commit is contained in:
Q
2023-01-01 11:51:12 +02:00
parent 6207e39396
commit 31660eff18

View File

@@ -13,7 +13,6 @@ _helpexit() {
exit 1 exit 1
} }
[[ -z "$1" ]] && _menu
for (( i=1; i<=$#; i++ )); do for (( i=1; i<=$#; i++ )); do
[[ ${!i} = "-h" ]] && _helpexit [[ ${!i} = "-h" ]] && _helpexit
[[ ${!i} = "--help" ]] && _helpexit [[ ${!i} = "--help" ]] && _helpexit
@@ -33,6 +32,7 @@ mountpath=~/mnt/am/"$valid_name"
if [[ "$unmount" = true ]]; then if [[ "$unmount" = true ]]; then
cd ~/mnt cd ~/mnt
if [[ -n "$archive" ]]; then if [[ -n "$archive" ]]; then
echo Unmounting "$mountpath"
fusermount -u -z "$mountpath" fusermount -u -z "$mountpath"
rmdir --ignore-fail-on-non-empty "$mountpath" &>/dev/null rmdir --ignore-fail-on-non-empty "$mountpath" &>/dev/null
else else