Hey RVA CocoaHeads,
Is the RVA CocoaHeads group still alive? I'm posting this questions, hoping to get a grunt of life.
I have an Automator Folder Action that optimizes each added image, using
image_optim.
The folder action does this by running a shell script that calls the image_optim executable.
Since the executable is from a ruby gem and I use rbenv, I have to load my .bashrc file where my rbenv and other things get setup.
That's simple:
source $HOME/.bashrc
I would like, however, to give this folder action to other folks for use,
So I'm looking for a general method to make that the shell script had done whatever setup terminal does when it opens a new shell.
I believe it runs the /usr/bin/login.
Two Questions:
- Can anyone link me to tell me a good tutorial / reference / explanation about what occurs when a new terminal window is opened on OS X?
- What is the best way of making sure that the shell script which runs in the folder action, setups the environment correctly?
I've attached the workflow and the shell script embedded in the workflow.
I'm no bash expert, so please let me know if I could improve the script.
-Tobias