#!/bin/bash
# Deploy on local Apache2 Httpd instance

gitRoot=`git rev-parse --show-toplevel`
from="$gitRoot/web/"
dest="/var/www/html/"

echo "A copy will be peformed from ..."
echo $from
echo " ... to ... "
echo $dest

bash "$gitRoot/undeployed/scripts/deploy/up-date.sh"
bash "$gitRoot/undeployed/scripts/deploy/up-version.sh"

rsync --delete --recursive --verbose $from $dest

git checkout -- "$gitRoot/web/include/generated/date.txt"
git checkout -- "$gitRoot/web/include/generated/version.txt"