build.sh

UNIX 专栏收录该内容
10 篇文章 0 订阅
ME=build.sh

#echo - Check for updates ......
if [ /home/sh13256/$ME -nt $0 ]; then
# echo - New version found. Update ...
cp /home/sh13256/$ME $0
echo - $0 Updated. Relaunching ...
echo
echo "$0 $*"
$0 $*
exit
fi
#echo - $0 is up to date

#set -x

CMD=$1
EXP=exp
ENVCMD=BuildCmdInXenv
bJAVA=/home/sh13256/j2se/1.5.0_12/bin/java
bROOT=`pwd`
LWL_COMPILE=lwlCompile
ISQL=/home/sh13256/sybase/bin/isql

SYBASE=/home/sh13256/sybase/
export SYBASE

remove(){

if [ -d $1 ]; then

currdate=`date '+%m%d%H%M%S'`

mv $1 $1.$currdate
rm -R $1.$currdate &
fi
}


build_back(){
ENVCMD_BACK=${ENVCMD}.back
rm $ENVCMD_BACK
echo "set -x" >> $ENVCMD_BACK
echo "cd back" >> $ENVCMD_BACK
echo "./prepareSourceTree.sh" >> $ENVCMD_BACK
echo "make package -f loans_qt.mk" >> $ENVCMD_BACK

chmod +x $ENVCMD_BACK
/xenv/xenv -i back/loans_qt.env ./back < $ENVCMD_BACK >>$1 2>&1
rm $ENVCMD_BACK
}

build_front(){
ENVCMD_FRONT=${ENVCMD}.front
rm $ENVCMD_FRONT
echo "set -x" >> $ENVCMD_FRONT
echo "cd front" >> $ENVCMD_FRONT
echo "./prepareFront.sh" >> $ENVCMD_FRONT
echo "make package -f lqtfront.mk" >> $ENVCMD_FRONT

chmod +x $ENVCMD_FRONT
/xenv/xenv -i front/front.env ./front < $ENVCMD_FRONT >>$1 2>&1
rm $ENVCMD_FRONT
}

build_loanWL(){
ENVCMD_LWL=${ENVCMD}.lwl
rm $ENVCMD_LWL
echo "set -x" >> $ENVCMD_LWL
echo "cd $2" >> $ENVCMD_LWL
echo "chmod +x ./prepare.sh" >> $ENVCMD_LWL
echo "./prepare.sh" >> $ENVCMD_LWL
echo "make package -f loanWL.mk" >> $ENVCMD_LWL

chmod +x $ENVCMD_LWL
/xenv/xenv -i $2/loanWL.env $2 < $ENVCMD_LWL >>$1 2>&1
rm $ENVCMD_LWL
}

hermesPrepareFront(){
ENVCMD_FRONT=${ENVCMD}.front
rm $ENVCMD_FRONT
echo "set +x" >> $ENVCMD_FRONT
echo "cd front" >> $ENVCMD_FRONT
echo "./prepareFront.sh" >> $ENVCMD_FRONT

chmod +x $ENVCMD_FRONT
/xenv/xenv -i front/front.env ./front < $ENVCMD_FRONT
rm $ENVCMD_FRONT

cd front
rm ../lqtfront.tar.Z
rm ../lqtfront.tar
tar cvf ../lqtfront.tar *
cd ..
compress lqtfront.tar
}

hermesPrepareBack(){
ENVCMD_BACK=${ENVCMD}.back
rm $ENVCMD_BACK
echo "set +x" >> $ENVCMD_BACK
echo "cd back" >> $ENVCMD_BACK
echo "./prepareSourceTree.sh" >> $ENVCMD_BACK

chmod +x $ENVCMD_BACK
/xenv/xenv -i back/loans_qt.env ./back < $ENVCMD_BACK
rm $ENVCMD_BACK

cd back
rm ../lqtback.tar.Z
rm ../lqtback.tar
tar cvf ../lqtback.tar *
cd ..
compress lqtback.tar
}

hermesPrepareLoanWL(){
ENVCMD_LWL=${ENVCMD}.lwl
rm $ENVCMD_LWL
echo "set +x" >> $ENVCMD_LWL
echo "cd ${LWL_COMPILE}" >> $ENVCMD_LWL
echo "chmod -R +x ." >> $ENVCMD_LWL
echo "./prepare.sh" >> $ENVCMD_LWL

chmod +x $ENVCMD_LWL
/xenv/xenv -i ./${LWL_COMPILE}/loanWL.env ./${LWL_COMPILE} < $ENVCMD_LWL
rm $ENVCMD_LWL

cd ${LWL_COMPILE}
rm ../loanWL.tar.Z
rm ../loanWL.tar
tar cvf ../loanWL.tar *
cd ..
compress loanWL.tar
}

# invoke before change dir to LoansQuickTicket
hermesPrepareLoansQTDB(){
cd LoansQTDB
rm ../loansqtDB.tar.Z
rm ../loansqtDB.tar
tar cvf ../loansqtDB.tar *
cd ..
compress loansqtDB.tar
}

loacteLqtCompileFolder(){
if [ -d $bROOT/LoansQuickTicket/compile ]; then
echo --- working on: $bROOT/LoansQuickTicket/compile ---
cd $bROOT/LoansQuickTicket/compile
elif [ -d $bROOT/compile ]; then
echo --- working on: $bROOT/compile ---
cd $bROOT/compile
else
echo --- working folder not found ---
exit
fi
}


if [ $CMD = "rm" ]; then
remove $2

elif [ $CMD = "isqldev" ]; then
$ISQL -Uloanadm -Pspring02 -SLOANQT_DEV_25K -I/home/sh13256/interfaces

elif [ $CMD = "isqlqa" ]; then
$ISQL -Uloanadm -Pspring02 -SLOANQT_QA -I/home/sh13256/interfaces

elif [ $CMD = "build_front" ]; then
build_front $2

elif [ $CMD = "build_back" ]; then
build_back $2

elif [ $CMD = "build_loanWL" ]; then
build_loanWL $2 $3

elif [ $CMD = "hermes" ]; then

if [ $# -lt 2 ]; then

echo "Usage:"
echo
echo " $0 hermes createFtCfg | createBkCfg | createLwlCfg"
echo " $0 hermes releasetype productname [config file]"
echo " releasetype = integration | major | minor | bugfix | resubmission"
echo " productname = lqtback | lqtfront | loanwl | lqtdb"
echo

exit

elif [ $2 = "createFtCfg" ]; then

CFG_FILE=lqtFront.hermes

rm -f $CFG_FILE
echo EnvFileList=lqt_front.env >> $CFG_FILE
echo PackageList=LQTFront:DSTREAM >> $CFG_FILE
echo AdditionalEmailList=shangshang.hu@citi.com >> $CFG_FILE
echo InteractiveMode=N >> $CFG_FILE
echo IncrementalDelivery=N >> $CFG_FILE
# echo SkipPreBuild=N >> $CFG_FILE
echo QuietEmail=Y >> $CFG_FILE
echo DeploymentGroup=DDS >> $CFG_FILE
echo DoAutoDeployment=Y >> $CFG_FILE

echo "Created : $CFG_FILE"

elif [ $2 = "createBkCfg" ]; then

CFG_FILE=lqtBack.hermes

rm -f $CFG_FILE
echo EnvFileList=loans_qt.env >> $CFG_FILE
echo PackageList=LoansQT:DSTREAM >> $CFG_FILE
echo AdditionalEmailList=shangshang.hu@citi.com >> $CFG_FILE
echo InteractiveMode=N >> $CFG_FILE
echo IncrementalDelivery=N >> $CFG_FILE
# echo SkipPreBuild=N >> $CFG_FILE
echo QuietEmail=Y >> $CFG_FILE
echo DeploymentGroup=GDS >> $CFG_FILE

echo "Created : $CFG_FILE"

elif [ $2 = "createLwlCfg" ]; then

CFG_FILE=loanWL.hermes

rm -f $CFG_FILE
echo EnvFileList=loanWL.env >> $CFG_FILE
echo PackageList=LoanWL:DSTREAM >> $CFG_FILE
echo AdditionalEmailList=shangshang.hu@citi.com >> $CFG_FILE
echo InteractiveMode=N >> $CFG_FILE
echo IncrementalDelivery=N >> $CFG_FILE
# echo SkipPreBuild=N >> $CFG_FILE
echo QuietEmail=Y >> $CFG_FILE
echo DeploymentGroup=GDS >> $CFG_FILE

echo "Created : $CFG_FILE"

else

SRCFILE=NO_THING
PRODUCTNAME=NO_THING
RELEASETYPE=$2

if [ $3 = "lqtback" ]; then
loacteLqtCompileFolder
if [ ! -f lqtback.tar.Z ]; then
hermesPrepareBack
fi
SRCFILE=lqtback.tar.Z
PRODUCTNAME=LoansQT
elif [ $3 = "lqtfront" ]; then
loacteLqtCompileFolder
if [ ! -f lqtfront.tar.Z ]; then
hermesPrepareFront
fi
SRCFILE=lqtfront.tar.Z
PRODUCTNAME=LQTFront
elif [ $3 = "loanwl" ]; then
if [ -d $bROOT/${LWL_COMPILE} ]; then
echo --- working on: $bROOT/${LWL_COMPILE} ---
else
echo --- working folder not found ---
exit
fi
if [ ! -f loanWL.tar.Z ]; then
hermesPrepareLoanWL
fi
SRCFILE=loanWL.tar.Z
PRODUCTNAME=LoanWL
elif [ $3 = "lqtdb" ]; then
if [ -d $bROOT/LoansQuickTicket/LoansQTDB ]; then
echo --- working on: $bROOT/LoansQuickTicket/LoansQTDB ---
cd $bROOT/LoansQuickTicket/
else
echo --- working folder not found ---
exit
fi
if [ ! -f $bROOT/LoansQuickTicket/loansqtDB.tar.Z ]; then
hermesPrepareLoansQTDB
fi
SRCFILE=loansqtDB.tar.Z
PRODUCTNAME=LoansQTDB
fi

LOG=submitToHermes.log
HMS_CMD=" -P ${PRODUCTNAME} -A 33684 -R ${RELEASETYPE} -B prod_uat -S ${SRCFILE}"

if [ $4 ]; then
HMS_CMD=" -P ${PRODUCTNAME} -A 33684 -R ${RELEASETYPE} -B prod_uat -S ${SRCFILE} -C $bROOT/$4"
fi

echo - /xenv/scripts/bin/SubmitToHermes $HMS_CMD
/xenv/scripts/bin/SubmitToHermes $HMS_CMD > $LOG

cat $LOG

FORM_ID=`cat $LOG | grep FormId: | sed 's/^FormId://'`
if [ $FORM_ID ]; then
echo
echo ---------- Canceling last submition. Form ID: $FORM_ID ----------
echo /xenv/scripts/bin/SubmitToHermes -T cancel -F $FORM_ID
/xenv/scripts/bin/SubmitToHermes -T cancel -F $FORM_ID
echo
echo ---------- Submit Job Again ----------
/xenv/scripts/bin/SubmitToHermes $HMS_CMD
fi
rm -f $LOG

fi

elif [ $CMD = "bkx" ]; then
/xenv/xenv -i back/loans_qt.env ./back

elif [ $CMD = "bk" ]; then
cd back
./prepareSourceTree.sh
make package -f loans_qt.mk

elif [ $CMD = "ftx" ]; then
/xenv/xenv -i front/front.env ./front

elif [ $CMD = "ft" ]; then
cd front
./prepareFront.sh
make package -f lqtfront.mk

elif [ $CMD = "cdx" ]; then
/xenv/xenv -i LQTCDTSIF/lqtcdtsif.env ./LQTCDTSIF

elif [ $CMD = "cd" ]; then
cd LQTCDTSIF
make package -f lqtcdtsif.mk

elif [ $CMD = "bkt" ]; then
# rm LoansQT.dstream
# cp ./back/LoansQT.dstream .

rm -R tmp
mkdir tmp

if [ $# -gt 1 ]; then
pkgtrans $2/LoansQT.dstream tmp
else
pkgtrans ./back/LoansQT.dstream tmp
fi

# pkgtrans ./back/LoansQT.dstream tmp

mkdir $EXP
rm $EXP/dataaccessor.jar
rm $EXP/query.jar
rm $EXP/exec.jar
rm $EXP/datamntn.jar
rm $EXP/tradegen.jar
rm $EXP/CBTEServer
rm $EXP/CDTSInterface
rm $EXP/RTAcctHandler
rm $EXP/RTProdHandler

cp tmp/LoansQT/reloc/*PT*/lib/dataaccessor.jar $EXP
cp tmp/LoansQT/reloc/*PT*/lib/query.jar $EXP
cp tmp/LoansQT/reloc/*PT*/lib/exec.jar $EXP
cp tmp/LoansQT/reloc/*PT*/lib/datamntn.jar $EXP
cp tmp/LoansQT/reloc/*PT*/lib/tradegen.jar $EXP
cp tmp/LoansQT/reloc/*PT*/bin/CBTEServer $EXP
cp tmp/LoansQT/reloc/*PT*/bin/CDTSInterface $EXP
cp tmp/LoansQT/reloc/*PT*/bin/RTAcctHandler $EXP
cp tmp/LoansQT/reloc/*PT*/bin/RTProdHandler $EXP
chmod -R 777 $EXP

ls -trl $EXP

elif [ $CMD = "ftt" ]; then
# rm LQTFront.dstream
# cp ./front/LQTFront.dstream .

rm -R tmp
mkdir tmp

if [ $# -gt 1 ]; then
pkgtrans $2/LQTFront.dstream tmp
else
pkgtrans ./front/LQTFront.dstream tmp
fi

mkdir $EXP
rm $EXP/qt.jar

cp tmp/LQTFront/reloc/*/lib/qt.jar $EXP
chmod -R 777 $EXP

ls -trl $EXP

elif [ $CMD = "cdt" ]; then
# rm LQTCDTSIF.dstream
# cp ./LQTCDTSIF/LQTCDTSIF.dstream .

rm -R tmp
mkdir tmp
pkgtrans ./LQTCDTSIF/LQTCDTSIF.dstream tmp

mkdir $EXP
rm $EXP/CDTSInterface

cp tmp/LQTCDTSIF/reloc/*PT*/bin/CDTSInterface $EXP
chmod -R 777 $EXP

ls -trl $EXP

elif [ $CMD = "bkftp" ]; then

if [ $# -gt 2 ]; then
exit
fi

rm $2

retcode=` ftp udeegps1.nj.ssmb.com <<ENDFTP
user anonymous anonymous
bin
cd /pub/incoming/LoansQT
get $2
ENDFTP
`;
echo $retcode

elif [ $CMD = "lwlftp" ]; then

if [ $# -gt 2 ]; then
exit
fi

rm $2

retcode=` ftp udeegps1.nj.ssmb.com <<ENDFTP
user anonymous anonymous
bin
cd /pub/incoming/LoanWL
get $2
ENDFTP
`;
echo $retcode

elif [ $CMD = "pkgrm" ]; then
if [ $# -gt 1 ]; then
case $2 in

bk)
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg remove LoansQT
;;
lwl)
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg remove LoanWL
;;

cdts3d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 LQTCDTSIF
;;
bk3d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 LoansQT
;;
bk2d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 LoansQT
;;
bk1d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 LoansQT
;;
lwl1d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 LoanWL
;;
lwl2d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 LoanWL
;;
lwl3d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgrm -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 LoanWL
;;
esac
fi

elif [ $CMD = "pkgadd" ]; then
if [ $# -gt 1 ]; then
case $2 in

bk)
if [ -f ./LoansQT.dstream ]; then
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg add LoansQT.dstream
else
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg add ${bROOT}/back/LoansQT.dstream
fi
;;
lwl)
if [ -f ./LoanWL.dstream ]; then
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg add LoanWL.dstream
else
/export/opt/SCsudo/bin/scsudo - root /opt/gfipkg/bin/gfipkg add ${bROOT}/${LWL_COMPILE}/LoanWL.dstream
fi
;;


cdts3d)
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 -d LQTCDTSIF.dstream
;;
bk3d)
if [ -f ./LoansQT.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 -d LoansQT.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 -d ./back/LoansQT.dstream
fi
;;
bk2d)
if [ -f ./LoansQT.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 -d LoansQT.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 -d ./back/LoansQT.dstream
fi
;;
bk1d)
if [ -f ./LoansQT.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 -d LoansQT.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 -d ./back/LoansQT.dstream
fi
;;
lwl1d)
if [ -f ./LoanWL.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 -d LoanWL.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol1/vol1_q1 -d ./${LWL_COMPILE}/LoanWL.dstream
fi
;;
lwl2d)
if [ -f ./LoanWL.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 -d LoanWL.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol5/vol5_q1 -d ./${LWL_COMPILE}/LoanWL.dstream
fi
;;
lwl3d)
if [ -f ./LoanWL.dstream ]; then
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 -d LoanWL.dstream
else
/export/opt/SCsudo/bin/scsudo root /usr/sbin/pkgadd -R /net/nasweh20v1gfi.nam.nsroot.net/vol/vol6/vol6_q1 -d ./${LWL_COMPILE}/LoanWL.dstream
fi
;;

esac
fi

elif [ $CMD = "bkxs" ]; then

hermesPrepareBack
/xenv/scripts/bin/send_to_hermes lqtback.tar.Z

elif [ $CMD = "bks" ]; then

cd back
./prepareSourceTree.sh
rm ../lqtback.tar.Z
rm ../lqtback.tar
tar cvf ../lqtback.tar *
cd ..
compress lqtback.tar
/xenv/scripts/bin/send_to_hermes lqtback.tar.Z

elif [ $CMD = "ftxs" ]; then

hermesPrepareFront
/xenv/scripts/bin/send_to_hermes lqtfront.tar.Z

elif [ $CMD = "fts" ]; then

cd front
./prepareFront.sh
rm ../lqtfront.tar.Z
rm ../lqtfront.tar
tar cvf ../lqtfront.tar *
cd ..
compress lqtfront.tar
/xenv/scripts/bin/send_to_hermes lqtfront.tar.Z

elif [ $CMD = "lwlxs" ]; then

hermesPrepareLoanWL
/xenv/scripts/bin/send_to_hermes loanWL.tar.Z

elif [ $CMD = "dbs" ]; then

cd LoansQuickTicket/LoansQTDB

rm ../LoansQTDB.tar.Z
rm ../LoansQTDB.tar
tar cvf ../LoansQTDB.tar *
cd ..
compress LoansQTDB.tar
/xenv/scripts/bin/send_to_hermes LoansQTDB.tar.Z

elif [ $CMD = "ant" ]; then

CLASSPATH=/xenv/ant/X/1.6.5/lib:/xenv/ant/X/1.6.5/lib/ant.jar:/xenv/ant/X/1.6.5/lib/ant-antlr.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bcel.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bsf.jar:/xenv/ant/X/1.6.5/lib/ant-apache-log4j.jar:/xenv/ant/X/1.6.5/lib/ant-apache-oro.jar:/xenv/ant/X/1.6.5/lib/ant-apache-regexp.jar:/xenv/ant/X/1.6.5/lib/ant-apache-resolver.jar:/xenv/ant/X/1.6.5/lib/ant-commons-logging.jar:/xenv/ant/X/1.6.5/lib/ant-commons-net.jar:/xenv/ant/X/1.6.5/lib/ant-icontract.jar:/xenv/ant/X/1.6.5/lib/ant-jai.jar:/xenv/ant/X/1.6.5/lib/ant-javamail.jar:/xenv/ant/X/1.6.5/lib/ant-jdepend.jar:/xenv/ant/X/1.6.5/lib/ant-jmf.jar:/xenv/ant/X/1.6.5/lib/ant-jsch.jar:/xenv/ant/X/1.6.5/lib/ant-junit.jar:/xenv/ant/X/1.6.5/lib/ant-launcher.jar:/xenv/ant/X/1.6.5/lib/ant-netrexx.jar:/xenv/ant/X/1.6.5/lib/ant-nodeps.jar:/xenv/ant/X/1.6.5/lib/ant-starteam.jar:/xenv/ant/X/1.6.5/lib/ant-stylebook.jar:/xenv/ant/X/1.6.5/lib/ant-swing.jar:/xenv/ant/X/1.6.5/lib/ant-trax.jar:/xenv/ant/X/1.6.5/lib/ant-vaj.jar:/xenv/ant/X/1.6.5/lib/ant-weblogic.jar:/xenv/ant/X/1.6.5/lib/ant-xalan1.jar:/xenv/ant/X/1.6.5/lib/ant-xslp.jar:/xenv/ant/X/1.6.5/lib/xercesImpl.jar:/xenv/ant/X/1.6.5/lib/xml-apis.jar::/xenv/java/X/1.4.2_08/jre/lib/rt.jar:/xenv/java/X/1.4.2_08/lib/tools.jar:.:/xenv/java/X/1.4.2_08/lib/classes.zip

JAVAHOME=/opt/j2se/1.4.2_08
JAVA_COMMAND=${JAVAHOME}/bin/java
ANT_CLASS=org.apache.tools.ant.Main

tmpBuild=build_`date '+%m%d'`.xml

rm $tmpBuild
cp -f /home/sh13256/build.xml $tmpBuild
${bJAVA} -cp ${CLASSPATH} ${ANT_CLASS} -f $tmpBuild $2
rm $tmpBuild

elif [ $CMD = "crlf" ]; then

set -x

CLASSPATH=/xenv/ant/X/1.6.5/lib:/xenv/ant/X/1.6.5/lib/ant.jar:/xenv/ant/X/1.6.5/lib/ant-antlr.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bcel.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bsf.jar:/xenv/ant/X/1.6.5/lib/ant-apache-log4j.jar:/xenv/ant/X/1.6.5/lib/ant-apache-oro.jar:/xenv/ant/X/1.6.5/lib/ant-apache-regexp.jar:/xenv/ant/X/1.6.5/lib/ant-apache-resolver.jar:/xenv/ant/X/1.6.5/lib/ant-commons-logging.jar:/xenv/ant/X/1.6.5/lib/ant-commons-net.jar:/xenv/ant/X/1.6.5/lib/ant-icontract.jar:/xenv/ant/X/1.6.5/lib/ant-jai.jar:/xenv/ant/X/1.6.5/lib/ant-javamail.jar:/xenv/ant/X/1.6.5/lib/ant-jdepend.jar:/xenv/ant/X/1.6.5/lib/ant-jmf.jar:/xenv/ant/X/1.6.5/lib/ant-jsch.jar:/xenv/ant/X/1.6.5/lib/ant-junit.jar:/xenv/ant/X/1.6.5/lib/ant-launcher.jar:/xenv/ant/X/1.6.5/lib/ant-netrexx.jar:/xenv/ant/X/1.6.5/lib/ant-nodeps.jar:/xenv/ant/X/1.6.5/lib/ant-starteam.jar:/xenv/ant/X/1.6.5/lib/ant-stylebook.jar:/xenv/ant/X/1.6.5/lib/ant-swing.jar:/xenv/ant/X/1.6.5/lib/ant-trax.jar:/xenv/ant/X/1.6.5/lib/ant-vaj.jar:/xenv/ant/X/1.6.5/lib/ant-weblogic.jar:/xenv/ant/X/1.6.5/lib/ant-xalan1.jar:/xenv/ant/X/1.6.5/lib/ant-xslp.jar:/xenv/ant/X/1.6.5/lib/xercesImpl.jar:/xenv/ant/X/1.6.5/lib/xml-apis.jar::/xenv/java/X/1.4.2_08/jre/lib/rt.jar:/xenv/java/X/1.4.2_08/lib/tools.jar:.:/xenv/java/X/1.4.2_08/lib/classes.zip

JAVAHOME=/opt/j2se/1.4.2_08
JAVA_COMMAND=${JAVAHOME}/bin/java
ANT_CLASS=org.apache.tools.ant.Main

tmpBuild=build_`date '+%m%d'`.xml

rm $tmpBuild

if [ $# -gt 1 -a -d ${2} ]; then
cd ${2}
fi

cp -f /home/sh13256/build.xml $tmpBuild
${bJAVA} -cp ${CLASSPATH} ${ANT_CLASS} -f $tmpBuild fixCRLF
rm $tmpBuild

elif [ $CMD = "crlfShallow" ]; then

CLASSPATH=/xenv/ant/X/1.6.5/lib:/xenv/ant/X/1.6.5/lib/ant.jar:/xenv/ant/X/1.6.5/lib/ant-antlr.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bcel.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bsf.jar:/xenv/ant/X/1.6.5/lib/ant-apache-log4j.jar:/xenv/ant/X/1.6.5/lib/ant-apache-oro.jar:/xenv/ant/X/1.6.5/lib/ant-apache-regexp.jar:/xenv/ant/X/1.6.5/lib/ant-apache-resolver.jar:/xenv/ant/X/1.6.5/lib/ant-commons-logging.jar:/xenv/ant/X/1.6.5/lib/ant-commons-net.jar:/xenv/ant/X/1.6.5/lib/ant-icontract.jar:/xenv/ant/X/1.6.5/lib/ant-jai.jar:/xenv/ant/X/1.6.5/lib/ant-javamail.jar:/xenv/ant/X/1.6.5/lib/ant-jdepend.jar:/xenv/ant/X/1.6.5/lib/ant-jmf.jar:/xenv/ant/X/1.6.5/lib/ant-jsch.jar:/xenv/ant/X/1.6.5/lib/ant-junit.jar:/xenv/ant/X/1.6.5/lib/ant-launcher.jar:/xenv/ant/X/1.6.5/lib/ant-netrexx.jar:/xenv/ant/X/1.6.5/lib/ant-nodeps.jar:/xenv/ant/X/1.6.5/lib/ant-starteam.jar:/xenv/ant/X/1.6.5/lib/ant-stylebook.jar:/xenv/ant/X/1.6.5/lib/ant-swing.jar:/xenv/ant/X/1.6.5/lib/ant-trax.jar:/xenv/ant/X/1.6.5/lib/ant-vaj.jar:/xenv/ant/X/1.6.5/lib/ant-weblogic.jar:/xenv/ant/X/1.6.5/lib/ant-xalan1.jar:/xenv/ant/X/1.6.5/lib/ant-xslp.jar:/xenv/ant/X/1.6.5/lib/xercesImpl.jar:/xenv/ant/X/1.6.5/lib/xml-apis.jar::/xenv/java/X/1.4.2_08/jre/lib/rt.jar:/xenv/java/X/1.4.2_08/lib/tools.jar:.:/xenv/java/X/1.4.2_08/lib/classes.zip

JAVAHOME=/opt/j2se/1.4.2_08
JAVA_COMMAND=${JAVAHOME}/bin/java
ANT_CLASS=org.apache.tools.ant.Main

tmpBuild=build_`date '+%m%d'`.xml

rm $tmpBuild

if [ $# -gt 1 -a -d ${2} ]; then
cd ${2}
fi

cp -f /home/sh13256/build.xml $tmpBuild
${bJAVA} -cp ${CLASSPATH} ${ANT_CLASS} -f $tmpBuild fixCrlfShallow
rm $tmpBuild

elif [ $CMD = "delcvs" ]; then

# CLASSPATH=/xenv/ant/X/1.6.5/lib:/xenv/ant/X/1.6.5/lib/ant.jar:/xenv/ant/X/1.6.5/lib/ant-antlr.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bcel.jar:/xenv/ant/X/1.6.5/lib/ant-apache-bsf.jar:/xenv/ant/X/1.6.5/lib/ant-apache-log4j.jar:/xenv/ant/X/1.6.5/lib/ant-apache-oro.jar:/xenv/ant/X/1.6.5/lib/ant-apache-regexp.jar:/xenv/ant/X/1.6.5/lib/ant-apache-resolver.jar:/xenv/ant/X/1.6.5/lib/ant-commons-logging.jar:/xenv/ant/X/1.6.5/lib/ant-commons-net.jar:/xenv/ant/X/1.6.5/lib/ant-icontract.jar:/xenv/ant/X/1.6.5/lib/ant-jai.jar:/xenv/ant/X/1.6.5/lib/ant-javamail.jar:/xenv/ant/X/1.6.5/lib/ant-jdepend.jar:/xenv/ant/X/1.6.5/lib/ant-jmf.jar:/xenv/ant/X/1.6.5/lib/ant-jsch.jar:/xenv/ant/X/1.6.5/lib/ant-junit.jar:/xenv/ant/X/1.6.5/lib/ant-launcher.jar:/xenv/ant/X/1.6.5/lib/ant-netrexx.jar:/xenv/ant/X/1.6.5/lib/ant-nodeps.jar:/xenv/ant/X/1.6.5/lib/ant-starteam.jar:/xenv/ant/X/1.6.5/lib/ant-stylebook.jar:/xenv/ant/X/1.6.5/lib/ant-swing.jar:/xenv/ant/X/1.6.5/lib/ant-trax.jar:/xenv/ant/X/1.6.5/lib/ant-vaj.jar:/xenv/ant/X/1.6.5/lib/ant-weblogic.jar:/xenv/ant/X/1.6.5/lib/ant-xalan1.jar:/xenv/ant/X/1.6.5/lib/ant-xslp.jar:/xenv/ant/X/1.6.5/lib/xercesImpl.jar:/xenv/ant/X/1.6.5/lib/xml-apis.jar::/xenv/java/X/1.4.2_08/jre/lib/rt.jar:/xenv/java/X/1.4.2_08/lib/tools.jar:.:/xenv/java/X/1.4.2_08/lib/classes.zip
#
# JAVAHOME=/opt/j2se/1.4.2_08
# JAVA_COMMAND=${JAVAHOME}/bin/java
# ANT_CLASS=org.apache.tools.ant.Main
#
# rm build.xml
# cp -f /home/sh13256/build.xml .
# ${bJAVA} -cp ${CLASSPATH} ${ANT_CLASS} -f build.xml delCVS
# rm build.xml

find . -name "CVS" -exec rm -rf {} \;

elif [ $CMD = "loanclient" ]; then

rm -R tmp
mkdir tmp
pkgtrans LoanWL.dstream tmp

rm -R merge
mkdir merge
cp ./tmp/LoanWL/reloc/*OPT*/applications/loanWLApp.ear ./merge

cd merge
mv loanWLApp.ear loanWLApp.ear.zip
unzip loanWLApp.ear.zip -d loanWLApp

mkdir jarDir
cp ./loanWLApp/APP-INF/lib/JavaCore.jar ./jarDir
cp ./loanWLApp/APP-INF/lib/TRSPojos.jar ./jarDir
cp ./loanWLApp/LoanClient.jar ./jarDir

cd jarDir
jar xf JavaCore.jar
jar xf TRSPojos.jar
jar xf LoanClient.jar

rm JavaCore.jar TRSPojos.jar LoanClient.jar
jar cvf loanclient.jar *

cd ..
cd ..
mkdir $EXP
rm $EXP/loanclient.jar
cp ./merge/jarDir/loanclient.jar $EXP
chmod -R 777 $EXP

rm -R merge
rm -R tmp

ls -trl $EXP

elif [ $CMD = "asp" ]; then

rm -f AuditSP.class
cp /home/sh13256/AuditSP.class .
if [ $# -gt 1 ]; then
${bJAVA} -cp . AuditSP $2
else
${bJAVA} -cp . AuditSP .
fi
rm -f AuditSP.class

elif [ $CMD = "ctrl" ]; then

if [ -d ./LoansQuickTicket/LQT/LoansQTDB ]; then
cd ./LoansQuickTicket/LQT/LoansQTDB/src
elif [ -d ./LoansQTDB ]; then
cd ./LoansQTDB/src
else
exit
fi

cp /home/sh13256/tree.bk.sh ./tree
chmod +x ./tree

TREE_CMD="./tree"
CTRL_TMP="loan_qt.ctrl.tmp"

rm -f ./$CTRL_TMP
bROOT=`pwd`
echo "#tbl" >> $CTRL_TMP
${TREE_CMD} | grep ${bROOT}.*\\.tbl$ | sed 's/^\/home.*src\///' | sed 's/^loan_qt/SQL/' | sed 's/\//,/g' >> $CTRL_TMP
echo "#trg" >> $CTRL_TMP
${TREE_CMD} | grep ${bROOT}.*\\.trg$ | sed 's/^\/home.*src\///' | sed 's/^loan_qt/SQL/' | sed 's/\//,/g' >> $CTRL_TMP
echo "#sp" >> $CTRL_TMP
${TREE_CMD} | grep ${bROOT}.*\\.sp$ | sed 's/^\/home.*src\///' | sed 's/^loan_qt/SQL/' | sed 's/\//,/g' >> $CTRL_TMP
echo "#sql" >> $CTRL_TMP
${TREE_CMD} | grep ${bROOT}.*\\.sql$ | sed 's/^\/home.*src\///' | sed 's/^loan_qt/SQL/' | sed 's/\//,/g' >> $CTRL_TMP

rm ${TREE_CMD}
cat $CTRL_TMP

echo "Saved at : ${bROOT}/${CTRL_TMP}"

else

echo Unknown CMD
echo
fi
  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

iteye_20559

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值