local/bin/udisks-unmount-all: Init

master
Pierre Neidhardt 2019-01-23 11:43:03 +01:00
parent 520e524466
commit bcc9f0a225
1 changed files with 17 additions and 0 deletions

17
.local/bin/udisks-unmount-all Executable file
View File

@ -0,0 +1,17 @@
#!/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