#!/bin/bash
source ~/.gamerc

[ "$1" == "" ] && exec echo "Usage: $0 <patch directory's name>"

REMOTE_PATCH_DIRS="${COUNTRY_CODE}_UNSTABLE"
PN=$1

mkdir ~/patch/${PN}

cd ~/patch/${PN}

lftp http://${REMOTE_PATCH_SERVER}/${REMOTE_PATCH_DIRS}/${PN} -e "mget *;exit"

echo y | TestCtrl patch TEST ${PN} noftp