if [ ! -z $PHAROSIS_HOME ] ; then echo "" echo "*Your environment is already set up for KMI Pharos Image Similarity Search" return 0 fi if [ ! -f "setup.bash" ] ; then echo "You must source the script from within the KMI Pharos ImageIS home directory" return 1 fi # Need to run this script from its own directory instead of whichever directory it may be called from thisdir=`pwd` taildir=${thisdir##*/} if [ -z $GSDL3SRCHOME ] ; then cd ../.. source gs3-setup.sh cd "$thisdir" fi export PHAROSIS_SRC_HOME=`pwd` export PHAROSIS_HOME=$PHAROSIS_SRC_HOME/web export PHAROSOS=$GSDLOS export PATH=$PHAROSIS_SRC_HOME/bin/script:$PHAROSIS_SRC_HOME/bin/$PHAROSOS:$PATH export GSDL3EXTS=$taildir:$GSDL3EXTS export DERBYDB_HOME=$PHAROSIS_HOME/derbyDB echo "" echo "+Your environment is now set up for KMI Pharos Image Similarity Search" echo " - To start DerbyDB: pharos-start-derby.sh" echo " - To stop DerbyDB: pharos-stop-derby.sh" echo "" echo " - To ingest image: pharos-imageis-add.pl collection file.jpg [doc-id]" echo " - To delete image: pharos-imageis-delete.pl collection doc-id" echo " - To ingest image: pharos-imageis-query.pl collection doc-id" echo "" return 0