`
xifengtaizi
  • 浏览: 11420 次
  • 性别: Icon_minigender_2
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

build.sh

    博客分类:
  • UNIX
 
阅读更多

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

分享到:
评论

相关推荐

    Android ffmpeg的Android.mk和build.sh

    Android ffmpeg的Android.mk和build.sh Android ffmpeg的Android.mk和build.sh

    auto_build.sh

    `auto_build.sh`是一个用于自动构建和导出IPA包的Shell脚本,特别是在Xcode 8及更高版本中,由于xcrun工具的变动,开发者需要转向使用`xcodebuild`来实现这一目标。这篇文章将深入探讨`xcodebuild`工具的使用以及...

    lame-ios-build.sh

    用于编译lame-3.99.5的脚本。 通过此脚本将 lame-3.99.5.tar.gz 编译成...chmod 777 lame-build.sh sudo -s ./lame-ios-build.sh 执行完毕后, fat-lame里面是所有平台指令库的合集 thin-lame是各个平台分别的指令库

    跨平台编译脚本build.sh

    跨平台(Linux/MacOS/iOS/Android/Windows)自动编译脚本,用户需要先自行安装cmake,并构建CMakelists.txt自定义编译规则,配合此脚本即可编译出对应平台的文件。 Linux:直接在Linux系统上运行此脚本,默认使用gcc...

    新版C与C++互调, 修复之前错误的build.sh

    本篇文章将深入探讨如何在C与C++之间进行互调,以及如何修复`build.sh`脚本中的错误,以便正确构建和链接项目。 首先,要实现C和C++的互调,我们需要理解两者之间的主要差异。C++支持类、模板、名字空间等高级特性...

    build.sh Android多渠道打包编译

    #!/bin/bash basedir=$(cd "$(dirname "$0")";pwd) cd $basedir markets="dev androiMarket gfan anzhi" for market in $markets do echo packaging wardrobe_1.1.1_$market.apk ... sed -i '' "s/\(android:...

    CMAKE编译脚本build.sh

    CMAKE编译脚本build.sh

    系统镜像制作脚本,运行sudo ./build.sh

    系统镜像制作脚本,运行sudo ./build.sh

    Android性能优化图片压缩build.sh

    Android性能优化图片压缩build.sh

    k8s-springboot-demo,k8s 发布springboot build.sh 和dockerFile

    k8s-springboot-demo,k8s 发布springboot jar包 build.sh 和Dockerfile ,k8s-springboot-demo.yaml

    kafka-eagle-1.4.3 .zip源码包直接build.sh编译

    kafka-eagle-1.4.3 .zip源码包直接build.sh编译,安装配置参考地址https://blog.csdn.net/qq_19524879/article/details/82848797

    rk3288 QT移植

    在Buildroot环境中,可以单独调用`./build.sh uboot`和`./build.sh kernel`。 5. 如果需要构建其他桌面系统,如Ubuntu,重复步骤1,但选择不同的选项。 6. 最后,运行`sudo ./build.sh`来生成最终的更新镜像,例如`...

    build.tar.gz

    首先,我们来看"build.sh" 这个文件,这通常是一个Shell脚本,用于执行一系列自动化任务。在国产系统部署WAR或JAR项目时,这个脚本可能会包括以下功能: 1. **环境检查**:检查系统版本、依赖库、Java运行环境(如...

    quick_build.sh

    源码编译脚本, Linux下使用的Android源码编译脚本,可根据自行项目修改使用 简单方便,易于合成

    x3_build.sh

    编译androd 系统的各个模块的脚本,uboot模块、boot模块、dtb模块。节约了大量的编译是时间

    ubuntu安装ffmpeg自动安装编译脚本(亲测可用ubuntu20.4)

    build.sh . build_pkg_config.sh . build_libfdk_aac.sh . build_libmp3lame.sh . build_libopus.sh . build_sdl2.sh . build_yasm.sh . build_libgsm.sh . build_libspeex.sh . build_libvpx.sh . build_libx264....

    urbackup_backend:UrBackup-Windows,MacOS和Linux的ClientServer开源网络备份

    ./switch_build.sh server 切换到服务器版本, ./switch_build.sh client git clone https://github.com/uroni/urbackup_frontend_wx client cd client && git checkout BRANCH 切换到建立客户。 然后使用构建...

    docker 部署spark集群配置文件

    build.sh build_network.sh -yarn-site.xml -stop_containers.sh -start-hadoop.sh -start_containers.sh -ssh_config -spark-env.sh -spark-defaults.conf -slaves -restart-hadoop.sh -restart_containers.sh -...

    build.bat:用于Sublime Text的build.bat构建系统

    简而言之,只要按下一个键,它就会在您的项目中启动一个名为build.bat或build.sh的文件,而您在此文件中放置的内容完全取决于您。 它非常灵活且易于设置,不需要保留项目文件,工作区或任何此类复杂情况。 只需从所...

    尝试在Linux上编译KestrelHttpServer

    Kestrel是目前在非Windows平台上运行ASP.NET 5应用程序的可用Web服务器,但微软似乎将它冷落在一边,源代码更新很慢。 ...  ./build.sh: line 31: packages/KoreBuild/build/kvm.sh: No such file

Global site tag (gtag.js) - Google Analytics