if [ ! -z $PHAROSHOME ] ; 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 hom directory" return 1 fi # Need to run this script from its own directory instead of whichever directory it may be called from thisdir=`pwd` if [ -z $GSDL3SRCHOME ] ; then cd ../.. source gs3-setup.sh cd "$thisdir" fi export PHAROSSRCHOME=`pwd` export PHAROSHOME=$PHAROSSRCHOME/web export PHAROSOS=$GSDLOS export IMAGEISHOME=`pwd` export PATH=$PHAROSSRCHOME/bin/script:$PHAROSSRCHOME/bin/$PHAROSOS:$PATH export DERBYDB_HOME=$PHAROSHOME/derbyDB export PHAROS_PREFIX_URL=http://localhost:8080/pharos echo "" echo "+Your environment is now set up for KMI Pharos Image Similarity Search" echo " - PHAROS_PREFIX_URL=$PHAROS_PREFIX_URL" 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" cd cmdline-api-srcpack ; source setup.bash ; cd .. return 0