Created
January 19, 2015 13:19
-
-
Save teddokano/33b688d383d0ba0323df to your computer and use it in GitHub Desktop.
Yosemite file copier for HDK-based mbed
This file contains 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
(* | |
* mbed executable copier for Yosemite | |
* 01-Nov-2014, tedd | |
* | |
* this program is distributed under Apache-2.0 license | |
* http://opensource.org/licenses/Apache-2.0 | |
*) | |
on open newFile | |
set targetPath to "/Volumes/MBED/" -- target volume (last '/' added on 2015Jan15) | |
set action1 to "sudo mount -u -w -o sync " & targetPath & ";" -- re-mounting the mbed volume | |
set newFileName to POSIX path of newFile -- get the file name and path in POSIX format | |
set action2 to "cp -X " & newFileName & " " & targetPath -- copy command | |
set comm to action1 & action2 -- concatinate all commands in a string | |
do shell script comm password "" with administrator privileges -- execute all commands on a shell | |
end open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yosemite file copier for HDK-based mbed
http://developer.mbed.org/users/okano/notebook/mbed-on-yosemite/