home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 May / CMCD0505.ISO / Software / Shareware / Programare / bugzero / WEB-INF / setup.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2004-01-05  |  1KB  |  40 lines

  1. #!/bin/sh
  2. # This is the set up script used to configure Bugzero system.
  3.  
  4. CLASSPATH=.:data:classes
  5.  
  6. if [ ! -d data ]; then
  7. if [ ! -d classes ]; then 
  8. echo "Can not find the data or classes directory"
  9. echo "Make sure this setup program is run in the same directory it is located" 
  10. exit 1
  11. fi
  12. fi
  13.  
  14. # Lines below enable this script to be run within dev environment
  15. if [ -d lib/classes ]; then
  16.    CLASSPATH=${CLASSPATH}:lib/classes
  17. fi
  18.  
  19. # Add all the jar or zip files inside lib
  20. for i in lib/*.* ; do
  21.   CLASSPATH=${CLASSPATH}:$i
  22. done
  23.  
  24. echo "Using CLASSPATH:   $CLASSPATH"
  25.  
  26. # If java is not in your path, specify the absolute path to java here
  27. # check the java version
  28. java -version
  29.  
  30. java -cp "$CLASSPATH" com.websina.install.InstallManager
  31.  
  32. if [ $? != 0 ]; then
  33. echo ////////////////////////////////////////////////////////////////////
  34. echo "Error occurred!"
  35. echo "If you do not have Java installed or java is not in your system path,"
  36. echo "please install J2SE (JDK1.3 or later) from java.sun.com and add the bin"
  37. echo "folder where the java command is located in the PATH."
  38. echo "See README for more details."
  39. fi
  40.