Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

telemark948

macrumors member
Original poster
I have an shell script that I launch from the command line. Is there an easy way to run this script using its own Icon in the applications folder.

Thanks

Andy
 
There very well may be a way to do this directly, but it could be easily accomplished by creating an AppleScript application that calls your shell script. The AppleScript editor will allow you to save the script as an application bundle.
 
Thanks for advice. I have been trying unsuccessfully to get the AppleScript Editor to work.

The shell script is not mine, I downloaded DbSchema which I run from the terminal window just with ./dbschema.sh as it doesn't have a application launcher with it, this works fine and launches the script.

But with the Apple Script Editor I get an error

I have tried:
do shell script "~/Applications/DbSchema/dbschema.sh"
do shell script " /bin/tcsh -c '~/Applications/DbSchema/dbschema.sh'"
do shell script " /bin/csh -c '~/Applications/DbSchema/dbschema.sh'"

and other various combinations.

The error I get is
error "Unable to access jarfile lib/updater.jar
Exception in thread \"main\" java.lang.NoClassDefFoundError: com/wisecoders/dbs/Dbs
Caused by: java.lang.ClassNotFoundException: com.wisecoders.dbs.Dbs
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)" number 1

It would be nice to figure out where i have gone wrong. However I did manage to create an app from the script using ScriptGUI.app.

Thanks

Andy
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.