#!/bin/bash

source ../cascade-make/lib/cascade-lib.bash GEXT_JENA .. $*


if [ $install = "1"  ] ; then

  echo "===="
  echo "= Installing GS Triplestore Wrapper scripts (for Fuseki1)"
  echo "=="

  triple_store="$GEXT_JENA/etc/tdb-triple-store"
  if [ ! -d "$triple_store" ] ; then
    echo "= Creating empty triple-store:"
    echo "    $triple_store"
    mkdir "$triple_store"

   /bin/cp tdb.ttl "$GEXT_JENA/etc/."
  fi

  echo "= Installing server-side scripts"
  /bin/cp gs-triplestore-* $GEXT_JENA/bin/script/.
  chmod a+rx $GEXT_JENA/bin/script/gs-triplestore-*


  echo "= Installing Greenstone-style CSS"
  /bin/cp fuseki.css $GEXT_JENA/etc/pages/.
  chmod a+r $GEXT_JENA/etc/pages/fuseki.css


  echo "===="
  echo ""

fi
