Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   SD completion alert and ejecting (https://www.shirt-pocket.com/forums/showthread.php?t=6110)

cookieme 02-23-2010 03:26 PM

SD completion alert and ejecting
 
I need to simplify SD usage for a user who is not very computer literate. There are two things I need some help with:

1. I know that SD works with Growl, but is it possible to have SD use the alert sound specified in System Preferences to alert the user that the copying is complete?

2. The user I'm helping has an external USB drive that has two partitions. Both are used for alternating SD backups. Problem is when the drive is connected obviously both partitions are mounted. No problem, but unfortunately once the SD copying is complete if I use the option "On successful completion: Eject <destination>" the other partition is still mounted. If you eject one of the partitions in the Finder you get a message asking if you want to eject only that one or all partitions on that drive. How can I automate this for SD, so that the user doesn't have to manually eject the remaining partition and can simply unplug the drive when SD is done?

Thanks

dnanian 02-23-2010 04:42 PM

1. If there's a Growl notification that beeps, sure.

2. You really can't, not with two partitions... unless you run a second copy that, say, copies *nothing* to the other partition (using copy newer/different) and then ejects it. That would work...

cookieme 02-23-2010 04:50 PM

Quote:

Originally Posted by dnanian (Post 28797)
1. If there's a Growl notification that beeps, sure.

2. You really can't, not with two partitions... unless you run a second copy that, say, copies *nothing* to the other partition (using copy newer/different) and then ejects it. That would work...

I've been googling to try and found solutions to both issues. I'm not very familiar with shell scripting, but isn't it possible to write a small script to eject (not sure difference with unmount) the disk, so that it does the same as if you eject in the Finder and after that play the system alert sound?

Can I use a compiled AppleScript instead of a shell script with SuperDuper's "Run shell script after copy completes"?

dnanian 02-23-2010 04:56 PM

I wouldn't do that, really. I'd do what I suggested...

cookieme 02-23-2010 05:09 PM

Quote:

Originally Posted by dnanian (Post 28799)
I wouldn't do that, really. I'd do what I suggested...

Can you please explain why you wouldn't run a shell script to do those two things after copying? I can understand why you would use Growl for the sound alert as you have built in support for it, but are there any problems with doing it without Growl?

dnanian 02-23-2010 05:34 PM

Because you can't eject a drive we're looking at, and the 'after copy' shell script runs while we're still expecting the drive to be there.

cookieme 02-23-2010 05:35 PM

I've put together this shell script:

Code:

#!/bin/bash
/usr/sbin/diskutil eject /Volumes/SD*
afplay /System/Library/Sounds/Hero.aiff

The external USB drive has two partitions called SD Daily and SD Weekly.

What do you think?

dnanian 02-23-2010 05:37 PM

I think I've said what I think. If you want, you can play the sound that way (although I think you're better off with Growl, since it can also proactively notify about problems). But don't eject like that.

cookieme 02-23-2010 05:38 PM

Quote:

Originally Posted by dnanian (Post 28803)
I think I've said what I think. If you want, you can play the sound that way (although I think you're better off with Growl, since it can also proactively notify about problems). But don't eject like that.

Ok, thank you.

cookieme 02-24-2010 07:17 AM

I'm sorry, but I've got to ask what is the difference between what I want to do with regards to ejecting and what this user does with his Drobo http://www.shirt-pocket.com/forums/s...ead.php?t=5466 ? Isn't this user ejecting (unmounting) the destination with a shell script and the "Run shell script after copying" option?

dnanian 02-24-2010 08:40 AM

Yes. But this is a different case, and what I suggested is what I'd do in this case. In his case, the intermediate volume couldn't be ejected, and there was basically no easy workaround. The suggestion I'm providing you with here is easier and doesn't require a shell script.

You can, of course, do what you want. But you asked me for advice for your situation, I provided it... and I stand by my suggested method.


All times are GMT -4. The time now is 08:46 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.