have gii module run a shell script


i’d like to have gii invoke a shell (sh) script every time it generates/updates a file. why? because i hate handling repetitive tasks manually :)

seriously, the sole purpose of the script is to commit the changes to a svn repo. selecting files for commit is handled in that script, i need not pass any parameters.

i couldn’t find the proper method to add an exec() call to. i’m puzzled. i need help locating the actual class/method. simply there are too many of them in the framework and there’s this remarkably intriguing addressing between them. clearly too heavy a task for a yii newbie like me.

i appreciate any help.

Actually i don’t get what you’re trying to achieve. Why don’t You add the .sh script to crontab?

You can also add exec() to a console command or to a controller if the action will be triggered by a browser action.


Maybe this snippet from Y!! can help you: