rwxrob-dot/scripts/eject
Rob Muhlestein 2ea0289e9f Rebase
2022-02-09 02:29:05 -05:00

8 lines
199 B
Bash
Executable File

#!/bin/sh
path=/media/$USER
first=$(ls -1 $path | head -1)
mpoint=$path/$first
[ -z "$first" ] && tell 'Nothing to eject.' && exit
umount $mpoint && tell "$first ejected" || tell 'Could not eject.'