#!/bin/bash if [ $# -ne 1 ] ; then echo "Usage: $0 collect-name" >&2 exit 1 fi graph_name=$1 port=${FUSEKI3_PORT:-8383} if [ "x$FULL_GREENSTONE_URL_PREFIX" != "x" ] ; then graph_uri="$FULL_GREENSTONE_URL_PREFIX/collection/$graph_name" else graph_uri="http://localhost:$port/greenstone3/library/collection/$graph_name" fi ## The following line helps with runing a she-bang line of: ## '#!/usr/bin/env ruby' ## when the current script has been run from Perl under Cygwin ## #export PATH=/usr/bin:$PATH #echo s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>" #s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>" #echo curl --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>" #s-update --service http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>" echo CURL POST: http://localhost:$port/fuseki3/greenstone/update "DROP GRAPH <$graph_uri>" curl --silent \ -X POST \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "update=DROP GRAPH <$graph_uri>" \ http://localhost:$port/fuseki3/greenstone/update 1>/dev/null