#!/bin/sh

if [ $# -lt 2 ]
then
        echo "$0 [REVISONNUM] [COMPANY EXT]"
        echo "REVISONNUM : Maximum revision of applications."
	echo "COMPANY EXT :  CC Nmame"
        echo "  ex)  /root/work/files/pack.sh R0697 KT"
        exit 1
fi

REVISION=$1
COMPANY_EXT=$2

WORK_HOME="/root/work"
WORK_PATH="$WORK_HOME/gts_files"
WORK_TAR="gts-3.5.0.$REVISION.tar.gz"
WORK_FILE_SRC="./gts-3.5.0.${REVISION}_$COMPANY_EXT"
WORK_FILE="./gts-3.5.0.${REVISION}"
WORK_SRC="$WORK_HOME/SOURCES"


rm -f $WORK_SRC/$WORK_TAR
rm -rf $WORK_FILE
cp -rf $WORK_FILE_SRC $WORK_FILE

tar -czvf $WORK_TAR $WORK_FILE

mv -f $WORK_TAR $WORK_SRC
