#!/bin/sh

REV=$1
OS_EXT=$2
COMPANY_EXT=$3
PLATFORM_EXT=$4

echo $OS_EXT
echo $PLATFORM_EXT

OS_PLAT_EXT=$OS_EXT"_"$PLATFORM_EXT

echo $OS_EXT
echo $OS_PLAT_EXT

MAJOR_VERSION=gts-3.5.0

SVNURL=http://svn.solbox.com/svn/interactive

if [ $# -lt 3 ]
then
        echo "$0 [REVISONNUM] [OS EXT] [COMPANY EXT]"
        echo "REVISONNUM : Maximum revision of applications."
        echo "	ex)  R0697"
        echo "OS EXT : CentOS5.4."
        echo "COMPANY EXT : KTICS or LGU"
        exit 1
fi


rm -rf gts*$COMPANY_EXT
WORK_PATH="/root/work/gts_files/$MAJOR_VERSION.${REV}_$COMPANY_EXT/"
SVN_SH="/root/work/gts_files/getlastsvn.sh"
mkdir -p $WORK_PATH

$SVN_SH "FILE" "$SVNURL" "/tags/release/gts/cc_statd" "$WORK_PATH" "cc_statd" "" "$OS_EXT"
$SVN_SH "FILE" "$SVNURL" "/tags/release/gts/cc_tsd" "$WORK_PATH" "cc_tsd" "" "$OS_EXT"
$SVN_SH "FILE" "$SVNURL" "/tags/release/gts/logmngd" "$WORK_PATH" "logmngd" "" "$OS_EXT"
$SVN_SH "FILE" "$SVNURL" "/tags/release/conf" "$WORK_PATH" "gts.conf" "" "$COMPANY_EXT"
