From 12102c365247329f4d6964d6b48e12fa2bf67208 Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Tue, 3 May 2022 08:41:57 +0200 Subject: Some changes --- bin/umount_dev | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin/umount_dev') diff --git a/bin/umount_dev b/bin/umount_dev index e2cc87a..9c299d5 100755 --- a/bin/umount_dev +++ b/bin/umount_dev @@ -1,6 +1,11 @@ #!/bin/sh echo "Unmounting /media/$1" + +if [ "$(pwd)" = "/media/$1" ]; then + cd ~/ +fi + sudo umount -l "/media/$1" sudo rm -r "/media/$1" echo "Unmounting /usr/local/Development/$1" -- cgit v1.2.3