source: gs3-extensions/jena-fuseki/trunk/src/src3/gs-triplestore-reset3@ 38274

Last change on this file since 38274 was 38274, checked in by davidb, 8 months ago

Updated to work as a GS3 extension without the need for Ruby

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3if [ $# -ne 1 ] ; then
4 echo "Usage: $0 collect-name" >&2
5 exit 1
6fi
7
8graph_name=$1
9
10port=${FUSEKI3_PORT:-8383}
11
12
13if [ "x$FULL_GREENSTONE_URL_PREFIX" != "x" ] ; then
14 graph_uri="$FULL_GREENSTONE_URL_PREFIX/collection/$graph_name"
15else
16 graph_uri="http://localhost:$port/greenstone3/library/collection/$graph_name"
17fi
18
19## The following line helps with runing a she-bang line of:
20## '#!/usr/bin/env ruby'
21## when the current script has been run from Perl under Cygwin
22##
23#export PATH=/usr/bin:$PATH
24
25#echo s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>"
26#s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>"
27
28
29#echo curl --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>"
30#s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>"
31
32echo CURL POST: http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>"
33curl --silent \
34 -X POST \
35 -H "Content-Type: application/x-www-form-urlencoded" \
36 -d "update=DROP GRAPH <$graph_uri>" \
37 http://localhost:$port/fuseki3/greenstone/update 1>/dev/null
Note: See TracBrowser for help on using the repository browser.