File:  [Local Repository] / badi / public_scripts / initialindexer / initialindexer
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed May 11 17:38:39 2005 UTC (18 years, 11 months ago) by adi
Branches: information_kinematics, MAIN
CVS tags: badi, HEAD
Various bash scripts.

#!/bin/sh

#
# Runs the InitialIndexer application which writes the file indexes to
# the SQL server.
#

echo "   _____________________________________"
echo "  |                                     |"
echo "  |  FileLister v0.5.1: InitialIndexer  |"
echo "  |_____________________________________|"
echo

JAVA_HOME="/usr/lib/sablevm"
INSTFILE=`readlink -f $0`
INSTDIR=`dirname $0`
INSTDIR=`readlink -f $INSTDIR`

if [ -z $INSTFILE ]; then
   # file is no link
   if [ -z $INSTDIR ]; then
      # directory is no link
      cd `dirname $0`
   else
      # directory is a link
      cd `dirname $INSTDIR`
   fi
else
   # file is a link
   cd `dirname $INSTFILE`
fi

if [ ! -x "./filelister_env.sh" ]; then
  echo "  filelister_env.sh is missing or not executable! Please make sure you"
  echo "  use the original distribution."
  exit 3
fi

. ./filelister_env.sh

echo  "FileLister classpath: $FILELISTERCLASSPATH"

exec $JAVA_HOME/bin/java -classpath "$FILELISTERCLASSPATH" org.alltimeflashdreamer.filelister.InitialIndexer $PROPERTYFILEDIR $1
iierr=$?
echo -e "\n"

# unfortunately, after java we are no more
if [ $iierr = 0 ]; then
  echo "$(basename $0) terminated successfully."
  exit 0
else
  echo "$(basename $0) exited with error $iierr. You may need to clean up the temporary tables in the DB."
  exit 1 
fi


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>