scripts/shepard.sh
changeset 158 eea70b5d3a93
parent 95 08b14ea8276f
child 165 63829d1fe965
equal deleted inserted replaced
157:c68f6790ea55 158:eea70b5d3a93
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 set -x 
     3 set -x 
     4 
     4 
     5 SCRIPTS_DIR=/home/symbian/wrttools/scripts
     5 SCRIPTS_DIR=/home/symbian/wrttools/scripts
     6 BUILD_DIR=/home/symbian/scratch/build_dir
     6 BASE_DIR=/home/symbian/scratch/build_dir
     7 DAY_OF_YEAR=`date +%j`
     7 DAY_OF_YEAR=`date +%j`
     8 HG_CMD=/usr/local/bin/hg
     8 HG_CMD=/usr/local/bin/hg
       
     9 ANT_CMD=/usr/local/apache-ant-1.8.0/bin/ant
     9 
    10 
    10 export PATH=.:/usr/java/jdk1.6.0_18/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    11 export PATH=.:/usr/java/jdk1.6.0_18/bin:/usr/local/apache-ant-1.8.0/bin/ant:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    11 
    12 
    12 export WS_DIR=${BUILD_DIR}/${DAY_OF_YEAR}/workspace/wrttools
    13 export SOURCE_DIR=${BASE_DIR}/${DAY_OF_YEAR}/workspace/wrttools
    13 LINUX_PROD_DIR=${BUILD_DIR}/${DAY_OF_YEAR}/linux
    14 export BUILD_DIR=${BASE_DIR}/${DAY_OF_YEAR}/eclipse.build
    14 LINUX_EXPORT_DIR=/home/symbian/scratch/025
       
    15 WIN32_PROD_DIR=${BUILD_DIR}/${DAY_OF_YEAR}/win32
       
    16 WIN32_EXPORT_DIR=/home/symbian/buildsFromEugene/win32.win32.x86
       
    17 MACOSX_PROD_DIR=${BUILD_DIR}/${DAY_OF_YEAR}/macosx
       
    18 MACOSX_EXPORT_DIR=/home/symbian/buildsFromEugene/macosx.cocoa.x86
       
    19 
    15 
    20 # display date and time 
    16 # display date and time 
    21 date
    17 date
    22 
    18 
    23 # create build structure
    19 # create build structure
    24 
    20 
    25 mkdir -p ${WS_DIR}
    21 mkdir -p ${BASE_DIR}/${DAY_OF_YEAR}/workspace
    26 mkdir -p ${LINUX_PROD_DIR}
    22 mkdir -p ${BASE_DIR}
    27 mkdir -p ${WIN32_PROD_DIR}
       
    28 mkdir -p ${MACOSX_PROD_DIR}
       
    29 
    23 
    30 # check out the code.
    24 # check out the code.
    31 cd ${BUILD_DIR}/${DAY_OF_YEAR}/workspace
    25 cd ${BASE_DIR}/${DAY_OF_YEAR}/workspace
    32 ${HG_CMD} clone http://sym-mrswitch:8000 wrttools 
    26 ${HG_CMD} clone http://sym-mrswitch:8000 wrttools 
    33 
    27 
    34 # generate scripts
    28 cd ${SOURCE_DIR}/scripts
    35 sh ${SCRIPTS_DIR}/runGen.sh ${SCRIPTS_DIR}/genBuildScripts.xml
       
    36 
    29 
    37 # build it. 
    30 ${ANT_CMD} -DbuildDirectory=${BUILD_DIR} -DsourceDirectory=${SOURCE_DIR}
    38 sh ${SCRIPTS_DIR}/runAnt.sh ${WS_DIR}
       
    39 
    31 
    40 # create product 
       
    41 # Linux 
       
    42 cp -pr ${LINUX_EXPORT_DIR}/eclipse ${LINUX_PROD_DIR}
       
    43 for j in `find ${WS_DIR} -name 'org.chromium*.jar' -o -name 'org.symbian*.jar'`
       
    44 do  
       
    45 	cp -p $j ${LINUX_PROD_DIR}/eclipse/plugins/
       
    46 done
       
    47 cp -p ${SCRIPTS_DIR}/supporting/* ${LINUX_PROD_DIR}/eclipse/
       
    48 
       
    49 # package it up. 
       
    50 
       
    51 cd ${LINUX_PROD_DIR}
       
    52 tar -czvf webruntime${DAY_OF_YEAR}.linux.tar eclipse
       
    53 
       
    54 # Mac OSX
       
    55 cp -pr ${MACOSX_EXPORT_DIR}/eclipse ${MACOSX_PROD_DIR}
       
    56 for j in `find ${WS_DIR} -name 'org.chromium*.jar' -o -name 'org.symbian*.jar'`
       
    57 do  
       
    58 	cp -p $j ${MACOSX_PROD_DIR}/eclipse/plugins/
       
    59 done
       
    60 cp -p ${SCRIPTS_DIR}/supporting/* ${MACOSX_PROD_DIR}/eclipse/
       
    61 
       
    62 # package it up. 
       
    63 cd ${MACOSX_PROD_DIR}
       
    64 tar -czvf  webruntime${DAY_OF_YEAR}.macosx.tar eclipse
       
    65 
       
    66 # Win32
       
    67 cp -pr ${WIN32_EXPORT_DIR}/eclipse ${WIN32_PROD_DIR}
       
    68 for j in `find ${WS_DIR} -name 'org.chromium*.jar' -o -name 'org.symbian*.jar'`
       
    69 do  
       
    70 	cp -p $j ${WIN32_PROD_DIR}/eclipse/plugins/
       
    71 done
       
    72 cp -p ${SCRIPTS_DIR}/supporting/* ${WIN32_PROD_DIR}/eclipse/
       
    73 
       
    74 # package it up. 
       
    75 
       
    76 cd ${WIN32_PROD_DIR}
       
    77 tar -czvf  webruntime${DAY_OF_YEAR}.win32.tar eclipse
       
    78