====== Script ======

<code sh>
  #!/bin/sh
  
  #RUN=`ps x | grep rsync | grep -v grep | wc -l`
  #if [ "$RUN" -gt 0 ]; then
  #echo "$(date) - $1 [already running]"  >> ../../deploy_projetcs/$1/deployment.log
  #exit 1
  #fi
  
  rm -rf ../../deploy_projetcs/$1
  hg archive -r tip ../../deploy_projetcs/$1/httpdocs
  rsync -cprzq ../../deploy_projetcs/$1/httpdocs/ deployment@mirocow.com:/var/www/nginx-sites/$1.mirocow.com/hg/
  echo "$(date) - $1 [successful]"  >> ../../deploy_projetcs/$1/deployment.log
  exit 0
</code>

