Changeset 2495 for proto/gml2svg


Ignore:
Timestamp:
Oct 19, 2012, 1:28:16 PM (7 years ago)
Author:
ksherdy
Message:

Added command line arg handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/gml2svg/C/xerces/perf.sh

    r2493 r2495  
    77#
    88
     9NO_ARGS=0
     10E_OPTERROR=85
     11USAGE="Usage: `basename $0` [-x Xerces 3.1.1  | -i ICXML | -p Pipeline ICXML]"
     12
     13if [ $# -eq "$NO_ARGS" ]    # Script invoked with no command-line args?
     14then
     15  echo $USAGE
     16  exit $E_OPTERROR          # Exit and explain usage.
     17                            # Usage: scriptname -options
     18                            # Note: dash (-) necessary
     19fi 
     20
     21OPTION=""
     22
     23while getopts ":xip" Option
     24do
     25  case $Option in
     26    x     ) OPTION=$Option;;
     27    i     ) OPTION=$Option;;
     28    p     ) OPTION=$Option;;
     29    *     ) echo "Invalid option."; echo $USAGE; exit $E_OPTERROR;   # Default.
     30  esac
     31done
     32
    933GML_DIR="../../data/layer/gml"
    1034
    11 # add an argument switch as a script parameter
     35if [ $OPTION = "x" ] ; then
     36        echo "Testing Xerces 3.1.1"
    1237
    13 APP="gml2svg_3_1_1"
    14 APP_TARGET="xerces_3_1_1"
    15 LIB_PATH="/home/ksherdy/Temp/xerces-c-3.1.1/src/.libs"
    16 SVG_DIR="svg_3_1_1"
    17 CC_DIR="cc_3_1_1"
    18 CC_RSLT="cc_3_1_1.txt"
     38        APP="gml2svg_3_1_1"
     39        APP_TARGET="xerces_3_1_1"
     40        LIB_PATH="/home/ksherdy/Temp/xerces-c-3.1.1/src/.libs"
     41        SVG_DIR="svg_3_1_1"
     42        CC_DIR="cc_3_1_1"
     43        CC_RSLT="cc_3_1_1.txt"
    1944
    20 #APP_TARGET="xerces_icx"
    21 #APP="gml2svg_icx"
    22 #LIB_PATH="/home/ksherdy/Temp/icxml/xerces/src/.libs/"
    23 #SVGDIR="svg_icx"
    24 #CC_DIR="cc_icx"
    25 #CC_RSLT="cc_icx.txt"
     45elif [ $OPTION = "i" ] ; then
     46        echo "Testing ICXML"
    2647
    27 #APP_TARGET="xerces_icx_pipeline"
    28 #APP="gml2svg_icx_pipeline"
    29 #LIB_PATH="/home/ksherdy/Temp/picxml/src-pipeline/xerces/src/.libs/"
    30 #SVGDIR="svg_icx_pipeline"
    31 #CC_DIR="cc_icx_pipeline"
    32 #CC_RSLT="cc_icx_pipeline.txt"
     48        APP_TARGET="xerces_icx"
     49        APP="gml2svg_icx"
     50        LIB_PATH="/home/ksherdy/Temp/icxml/xerces/src/.libs/"
     51        SVGDIR="svg_icx"
     52        CC_DIR="cc_icx"
     53        CC_RSLT="cc_icx.txt"
     54
     55elif [ $OPTION = "p" ] ; then
     56        echo "Testing Pipelined ICXML"
     57
     58        APP_TARGET="xerces_icx_pipeline"
     59        APP="gml2svg_icx_pipeline"
     60        LIB_PATH="/home/ksherdy/Temp/picxml/src-pipeline/xerces/src/.libs/"
     61        SVGDIR="svg_icx_pipeline"
     62        CC_DIR="cc_icx_pipeline"
     63        CC_RSLT="cc_icx_pipeline.txt"
     64
     65fi
     66
    3367
    3468PAPI_EVENTS=`grep -v -e '^#\|^$' papi_events.txt`
Note: See TracChangeset for help on using the changeset viewer.