#!/bin/bash
[ "$1" == "" ] && exec echo "Usage: $0 <CDN Environment (TEST/LIVE)>"

source $HOME/.gamerc

ENVIRONMENT=$1

echo "Sync Environment => ${XIGNCODE_PATCH_ROOT_CDN}${ENVIRONMENT}/."
rsync -av --delete --progress ${XIGNCODE_PATCH_ROOT_SOURCE}${ENVIRONMENT}/${XIGNCODE_PATCH_ROOT_DIRECTORY_NAME} ${XIGNCODE_PATCH_ROOT_CDN}${ENVIRONMENT}/.

cd ~/patch/; php flush.php flush_all.txt
