macOS tools moving to my git
This commit is contained in:
11
unmountvol
Executable file
11
unmountvol
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
export PATH=$PATH:/usr/bin/local
|
||||
echo "Looking for $1"
|
||||
_MYDISK=`diskutil list | grep -w "$1" | awk '{print $6}'`
|
||||
if [ $_MYDISK = 'TB' ]; then
|
||||
_MYDISK=`diskutil list | grep -w "$1" | awk '{print $7}'`
|
||||
elif [ $_MYDISK = 'GB' ]; then
|
||||
_MYDISK=`diskutil list | grep -w "$1" | awk '{print $7}'`
|
||||
fi
|
||||
echo "Unmounting $_MYDISK"
|
||||
diskutil unmount force /dev/$_MYDISK
|
||||
Reference in New Issue
Block a user