#!/bin/bash if [ $# -ne 2 ] ; then echo "Usage: $0 collect-name ttl-file" >&2 exit 1 fi graph_name=$1 # triplestore server setup to also add to 'default' graph automatically file_ttl=$2 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-post http://localhost:$port/fuseki3/greenstone/data "$graph_uri" "$file_ttl" s-post http://localhost:$port/fuseki3/greenstone/data "$graph_uri" "$file_ttl"