Automate a terminal command
Hello
There is a command I run in Terminal every time I restart my computer that watches and keeps 2 folders in Sync. The command is as follows...
nohup fswatch-run -r /"Folder to watch"/ /"location of rSync shell".sh >/dev/null 2>&1 &
The nohup and & ensure the programs continue to run after I close down Terminal
The small .sh file is a simple rSync shell that keeps the 2 folders in sync
rsync -aE --delete /"location of folder 1"/ /"location of folder 2"
I have lost hours trying to automate this process i.e. through Automator and AppleScript (via do shell script) but cannot seem to get it to work.
Has anyone got any ideas? Am I doing something wrong or missing something?
Cheers
Andrew
MacBook Pro (Retina, 15-inch, Late 2013), OS X Mavericks (10.9.5), Automator