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

gitRoot=`git rev-parse --show-toplevel`
from="$gitRoot/src/"
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/src/include/generated/date.txt"
git checkout -- "$gitRoot/src/include/generated/version.txt"
