I am maintaining a large number of wordpress installs on a production server, and we are looking to deploy InfiniteWP for managing these installs. I am looking for a way to script the distribution of the plugin folder to all of these installs.

On server wp-prod, all sites are stored in /srv/sitename/site/
The plugin needs to be copied from ~/iws-plugin to /srv/sitename/site/wp-content/plugins/

Here's some pseudo code to explain what I need to do:

```
array dirs = <all folders in /srv>
for each d in dirs
   if exits "/srv/d/site/wp-content/plugins"
     rsync -avzh --log-file=~/d.log ~/plugin_base_folder /srv/d/site/wp-content/plugins/
   else
     touch d.log
     echo 'plugin folder for "d" not found' >> ~/d.log
   end
end

```

I just don't know how to make it happen from the cli or via bash. I can (and will) tinker with a bash or ruby script on my test server, but I'm thinking the command-line-fu here on SF is strong enough to handle this issue much more quickly than I can hack together a solution.

Thanks!