Strabon

changeset 199:d7b2fb010f7a

"fixed" problem with quotes.
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon May 28 17:51:50 2012 +0300 (2012-05-28)
parents b0891a609ae3
children 83372b21a26b
files scripts/endpoint
line diff
     1.1 --- a/scripts/endpoint	Thu May 24 19:10:34 2012 +0300
     1.2 +++ b/scripts/endpoint	Mon May 28 17:51:50 2012 +0300
     1.3 @@ -89,7 +89,7 @@
     1.4  		# TODO: make it an argument
     1.5  		FORMAT="XML"
     1.6  
     1.7 -		CMD="curl ${CURL_OPTS} -d \"format=${FORMAT}\" --data-urlencode \"SPARQLQuery=${QUERY}\" ${URL}"
     1.8 +		CMD="curl ${CURL_OPTS} -d format='${FORMAT}' --data-urlencode SPARQLQuery='${QUERY}' ${URL}"
     1.9  		;;
    1.10  	update)
    1.11  		shift
    1.12 @@ -100,7 +100,7 @@
    1.13  		URL="${1}/Update"
    1.14  		QUERY="${2}"
    1.15  		
    1.16 -		CMD="curl ${CURL_OPTS} --data-urlencode \"SPARQLQuery=${QUERY}\" ${URL}"
    1.17 +		CMD="curl ${CURL_OPTS} --data-urlencode SPARQLQuery='${QUERY}' ${URL}"
    1.18  		;;
    1.19  	store)
    1.20  		shift
    1.21 @@ -113,11 +113,11 @@
    1.22  		case "${3}" in
    1.23  			-t)
    1.24  				TRIPLES="${4}"
    1.25 -				CMD="curl ${CURL_OPTS} -d \"format=${FORMAT}\" --data-urlencode \"data=${TRIPLES}\" ${URL}"
    1.26 +				CMD="curl ${CURL_OPTS} -d format='${FORMAT}' --data-urlencode data='${TRIPLES}' ${URL}"
    1.27  				;;
    1.28  			-u)
    1.29  				URL_TRIPLES="${4}"
    1.30 -				CMD="curl ${CURL_OPTS} -d \"format=${FORMAT}\" --data-urlencode \"url=${URL_TRIPLES}\" -d \"fromurl=\" ${URL}"
    1.31 +				CMD="curl ${CURL_OPTS} -d format='${FORMAT}' --data-urlencode url='${URL_TRIPLES}' -d fromurl='' ${URL}"
    1.32  				;;
    1.33  			 *)
    1.34  				help_store