Execute shell script on file change? (Folder Actions?)
Hi,
perhaps someone can figure this out. I have a folder with PHP files that I edit with TextMate. After saving them, I want them uploaded to the server; I use rsync to do this. E.g., something like:
rsync -rvzpP ~/my_folder/someScript.php myServer.com:foo/bar/
Now, it's not a big deal, but it would be sweet if I could have the uploading occur automatically after saving. I could probably hook this into TextMate somehow, or I could use some launchd magic to listen to changes. But perhaps Folder Actions can do this?
perhaps someone can figure this out. I have a folder with PHP files that I edit with TextMate. After saving them, I want them uploaded to the server; I use rsync to do this. E.g., something like:
Code:
rsync -rvzpP ~/my_folder/someScript.php myServer.com:foo/bar/
Now, it's not a big deal, but it would be sweet if I could have the uploading occur automatically after saving. I could probably hook this into TextMate somehow, or I could use some launchd magic to listen to changes. But perhaps Folder Actions can do this?
Comments
Try that. Modify the plist file as needed, and have it run your rsync.