Forum Discussion
Hi, I'm wondering if anyone has some examples of scripts for the Mac? Can we run commands in the Terminal? Applescript?
I want to script a reinstall of Java 1.5 which is removed during a Snow Leopard upgrade.
I want to know if it's possible to run these commands as a script
Step 1 Download a file eg
www.cesoft.com.au/downloads/java/java5.zip
Step 2 Run these commands in Terminal
cd Downloads
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
sudo chown -R root:wheel ./1.5.0-leopard
They should be run in a terminal window, but there may be a way to do it with AppleScript. I hope you can give me some pointers. The user will need to enter a password for the first sudo command