Strabon

changeset 572:9723ad99e922

added option -M for MAX_ACQUISITION_TIME template variable (in discovery.rq query only)
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Oct 01 19:27:32 2012 +0300 (2012-10-01)
parents 0dad447e2c34
children 9acbd30218e1
files examples/teleios/instantiate.sh
line diff
     1.1 --- a/examples/teleios/instantiate.sh	Mon Oct 01 19:22:31 2012 +0300
     1.2 +++ b/examples/teleios/instantiate.sh	Mon Oct 01 19:27:32 2012 +0300
     1.3 @@ -35,9 +35,10 @@
     1.4  	echo "	-c, --chain		: the processing chain to use, e.g., \`DynamicThresholds'"
     1.5  	echo "	-t, --timestamp		: the timestamp to use, e.g., \`2010-08-21T19:50:00'"
     1.6  	echo "	-m, --min_acq_time	: the minimum acquisition time (used in a persistence query only)"
     1.7 +	echo "	-M, --max_acq_time	: the maximum acquisition time (used in a discovery query only)"
     1.8  	echo
     1.9  	echo "Example run:"
    1.10 -	echo "	instantiate.sh -s MSG1 -t '2010-08-21T19:50:00' -c "DynamicThresholds" -m '2010-08-21T19:50:00' *.rq"
    1.11 +	echo "	./instantiate.sh -s MSG1 -t '2010-08-21T19:50:00' -c "DynamicThresholds" -m '2010-08-21T19:50:00' -M '2010-08-21T19:50:00' *.rq"
    1.12  }
    1.13  
    1.14  SENSOR=
    1.15 @@ -45,7 +46,8 @@
    1.16  SAT=
    1.17  N_ACQUISITIONS=
    1.18  TIMESTAMP=
    1.19 -MIN_ACQUISITIONS=
    1.20 +MIN_ACQ_TIME=
    1.21 +MAX_ACQ_TIME=
    1.22  
    1.23  if test $# -eq 0; then
    1.24  	help
    1.25 @@ -91,6 +93,11 @@
    1.26  			MIN_ACQ_TIME="${1}"
    1.27  			shift
    1.28  			;;
    1.29 +		-M|--max_acq_time)
    1.30 +			shift
    1.31 +			MAX_ACQ_TIME="${1}"
    1.32 +			shift
    1.33 +			;;
    1.34  		-*)
    1.35  			echo "${CMD}: unknown option \"${1}\""
    1.36  			help
    1.37 @@ -126,6 +133,10 @@
    1.38  	ARGS="${ARGS} -e 's/MIN_ACQUISITION_TIME/${MIN_ACQ_TIME}/g'"
    1.39  fi
    1.40  
    1.41 +if test ! -z "${MAX_ACQ_TIME}"; then
    1.42 +	ARGS="${ARGS} -e 's/MAX_ACQUISITION_TIME/${MAX_ACQ_TIME}/g'"
    1.43 +fi
    1.44 +
    1.45  if test -z "${ARGS}"; then
    1.46  	echo "${CMD}: You would be so kind to provide at least one OPTION."
    1.47  	help
    1.48 @@ -137,7 +148,7 @@
    1.49  #echo eval sed ${ARGS} ${@}
    1.50  
    1.51  # check for unbounded variables
    1.52 -GREP_RESULT=`echo "${QUERY}" | egrep -o 'PROCESSING_CHAIN|SENSOR|"SAT"|ACQUISITIONS_IN_HALF_AN_HOUR|TIMESTAMP|MIN_ACQUISITION_TIME'`
    1.53 +GREP_RESULT=`echo "${QUERY}" | egrep -o 'PROCESSING_CHAIN|SENSOR|"SAT"|ACQUISITIONS_IN_HALF_AN_HOUR|TIMESTAMP|MIN_ACQUISITION_TIME|MAX_ACQUISITION_TIME'`
    1.54  if ! test $? -eq 0; then
    1.55  	echo "${QUERY}"
    1.56