Strabon

changeset 238:d34c1c13c48c

added comments
author Babis Nikolaou <charnik@di.uoa.gr>
date Sun Jun 03 15:46:18 2012 +0300 (2012-06-03)
parents 7f8b766725fc
children 612a0ddbb147
files scripts/strabon
line diff
     1.1 --- a/scripts/strabon	Sun Jun 03 15:43:31 2012 +0300
     1.2 +++ b/scripts/strabon	Sun Jun 03 15:46:18 2012 +0300
     1.3 @@ -22,7 +22,7 @@
     1.4  	echo "	COMMAND	 : one of \`query', \`update', \`store', or \`help'"
     1.5  	echo "	ARGS	 : arguments according to selected command"
     1.6  	echo
     1.7 -	echo "OPTIONS can be one of the following"
     1.8 +	echo "OPTIONS can be any of the following"
     1.9  	echo "	-d	 : don't run, just print what shall be executed"
    1.10  	#echo "	-c FILE	 : configuration file to use for the connection. It defaults to \`${HOME}/.strabon'."
    1.11  }
    1.12 @@ -104,6 +104,8 @@
    1.13  
    1.14  # configuration file for the Strabon connection
    1.15  STRABON_CONF="${HOME}/.strabon"
    1.16 +
    1.17 +# read script options
    1.18  case "${1}" in
    1.19  	-d)
    1.20  		shift
    1.21 @@ -124,6 +126,7 @@
    1.22  		;;
    1.23  esac
    1.24  
    1.25 +# determine command to execute
    1.26  case "${1}" in
    1.27  	help)
    1.28  		shift
    1.29 @@ -223,6 +226,7 @@
    1.30  		;;
    1.31  esac
    1.32  
    1.33 +# compile command to execute
    1.34  if test "${CLASS}" = "StoreOp"; then
    1.35  	STRABON_EXEC=
    1.36  	for file in "${@}"; do
    1.37 @@ -233,7 +237,7 @@
    1.38  	STRABON_EXEC="(cd ${RUNTIME} && java -cp ./target/\*:. ${PKG}.${DATABASE}.${CLASS} ${HOST} ${PORT} ${DB} ${DBUSER} ${DBPASS} \"${QUERY}\")"
    1.39  fi
    1.40  
    1.41 -# execute or debug
    1.42 +# execute command or debug
    1.43  if test ${DEBUG} -eq 1; then
    1.44  	echo "${CMD}: Debug is ON"
    1.45  	echo "${CMD}: Printing command for execution"