Last change
on this file since 37271 was 37271, checked in by davidb, 16 months ago |
Progression towards the Fuseki server being run as a war file within Greenstone3's tomcat/webapps area
|
-
Property svn:executable
set to
*
|
File size:
551 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ $# -eq 0 ] ; then
|
---|
4 | echo "Usage: $0 file-query.sparql"
|
---|
5 | exit 1
|
---|
6 | fi
|
---|
7 |
|
---|
8 | input_sparql_query_file=$1
|
---|
9 |
|
---|
10 | output_json_queryresult_file=${input_sparql_query_file%.*}.json
|
---|
11 |
|
---|
12 | sparql_query=`cat "$input_sparql_query_file"`
|
---|
13 |
|
---|
14 | port=${FUSEKI3_PORT:-8383}
|
---|
15 |
|
---|
16 |
|
---|
17 | # The following line helps with runing a she-bang line of:
|
---|
18 | # '#!/usr/bin/env ruby'
|
---|
19 | # when the current script has been run from Perl under Cygwin
|
---|
20 | #
|
---|
21 | export PATH=/usr/bin:$PATH
|
---|
22 |
|
---|
23 | s-query --service http://localhost:$port/fuseki3/greenstone/query \
|
---|
24 | "$sparql_query" > "$output_json_queryresult_file"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.