I have a php server with this file tree :
/common
- functions.inc.php
- ...
/website1
/functions
- functions.inc.php
/website2
/functions
- functions.inc.php
Websites should be shipped separately without the common
folder which might contain non-needed files per case (jquery extensions,...)
I would like to synchronize some files in common
through all the website*
projects, so for example when I change something in common/functions.inc.php
the file is replaced in all the website*/functions/
folders
I am thinking of a bash script to do this (manual or through inotify
), but I was wondering is there an automatic/manual native or an existing tool through version control (git, svn,...) to synchronize these files this way?
I have in mind something like the versioning of angular dependencies or maven depencies using a version number.
I am currently using an external svn (https://www.assembla.com/home), but if git has more options for this case I could consider migrating. My projects are on a linux machine (Raspberry pi or Lubuntu) but a Windows approach could be handy.
I completely own the functions.inc.php
file so I can write anything inside such as a version number