Created
February 3, 2010 20:49
-
-
Save kogakure/294006 to your computer and use it in GitHub Desktop.
Bash: Eject/reconnect external harddrives with SleepWatcher (http://www.bernhard-baehr.de/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| osascript -e 'tell application "Finder" to eject "Backup"' | |
| osascript -e 'tell application "Finder" to eject "Media"' | |
| osascript -e 'tell application "Finder" to eject "Daten"' | |
| osascript -e 'tell application "Finder" to delay 5' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| backupVolume=`diskutil list | awk '/ Backup / {print $6}'` | |
| if [ ! -z "$backupVolume" ] | |
| then | |
| diskutil mount $backupVolume | |
| fi | |
| mediaVolume=`diskutil list | awk '/ Media / {print $6}'` | |
| if [ ! -z "$mediaVolume" ] | |
| then | |
| diskutil mount $mediaVolume | |
| fi | |
| dataVolume=`diskutil list | awk '/ Daten / {print $6}'` | |
| if [ ! -z "$dataVolume" ] | |
| then | |
| diskutil mount $dataVolume | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment