Execute .sh in GUI w/o chmod +x

patkitchen

Registered
So, I'll have to provide some background info so you know what's going on. I'm setting up a preconfigured .conf for Viscosity (OpenVPN). What my sh script does is copies all the pertinent files to the correct folders and runs sed to customize it for the particular user. Normally you'd just chmod +x it to make it executable..in this situation EVERYTHING needs to be rolled up into one click as this will be distributed to 'uninformed' users and needs to be foolproof.

I've tried "sh->app" rollers such as platypus and they suck and only run half of my script at best.

So experts, I Ask, how does one make a self-contained, executable .sh script that can be distributed and executed on multiple computers without ANY user intervention beyond "download this and double click it"

Thanks in advance,

Pat
 
Set the execute bit, Get Info on the file and "Always Open With..." Terminal. Place the file within a new folder. Create a disk image from the folder (Disk Utility > File menu > New > Disk image from folder.) Both the execute bit and the choice of program with which to run the file will be preserved within the disk image. Your clients can double-click to mount the disk image and then double-click the script to run it. If desired, have your script kill Terminal when it completes.
 
Back
Top