18 lines
255 B
Plaintext
18 lines
255 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
if [ "$1" = "-h" ]; then
|
||
|
cat <<EOF>&2
|
||
|
Usage: ${0##*/}
|
||
|
|
||
|
Automatically unmount external drives mounted with 'udisks'.
|
||
|
|
||
|
EOF
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
while IFS= read -r i; do
|
||
|
udisksctl unmount -b "$i"
|
||
|
done <<EOF
|
||
|
$(findmnt -n --output SOURCE /media/$USER/*)
|
||
|
EOF
|