source: gs2-extensions/video-and-audio/trunk/src/opt/Terrier/http_terrier.sh@ 26192

Last change on this file since 26192 was 26192, checked in by jmt12, 12 years ago

Customized Jetty launcher to allow for symbolic linked files - like the aforecheckedin results.jsp

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#!/bin/bash
2#
3# Terrier - Terabyte Retriever
4# Webpage: http://terrier.org
5# Contact: [email protected]
6#
7# The contents of this file are subject to the Mozilla Public
8# License Version 1.1 (the "License"); you may not use this file
9# except in compliance with the License. You may obtain a copy of
10# the License at http://www.mozilla.org/MPL/
11#
12# Software distributed under the License is distributed on an "AS
13# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14# implied. See the License for the specific language governing
15# rights and limitations under the License.
16#
17# The Original Code is http_server.sh
18#
19# The Initial Developer of the Original Code is the University of Glasgow.
20# Portions created by The Initial Developer are Copyright (C) 2004-2011
21# the initial Developer. All Rights Reserved.
22#
23# Contributor(s):
24# Vassilis Plachouras <[email protected]> (original author)
25# Craig Macdonald <[email protected]>
26#
27# a script for starting a Jetty webserver, for retrieval results
28# by default, port 8080
29
30fullPath () {
31 t='TEMP=`cd $TEMP; pwd`'
32 for d in $*; do
33 eval `echo $t | sed 's/TEMP/'$d'/g'`
34 done
35}
36
37TERRIER_BIN=`dirname $0`
38if [ -e "$TERRIER_BIN/terrier-env.sh" ];
39then
40 . $TERRIER_BIN/terrier-env.sh
41fi
42
43#setup TERRIER_HOME
44if [ ! -n "$TERRIER_HOME" ]
45then
46 #find out where this script is running
47 TEMPVAR=`dirname $0`
48 #make the path abolute
49 fullPath TEMPVAR
50 #terrier folder is folder above
51 TERRIER_HOME=`dirname $TEMPVAR`
52 #echo "Setting TERRIER_HOME to $TERRIER_HOME"
53fi
54
55if [ -z "$TERRIER_LIB" ];
56then
57 TERRIER_LIB=$TERRIER_HOME/lib/
58fi
59
60for f in $TERRIER_LIB/jetty-ext/*.jar;
61do
62 if [ -z "$CLASSPATH" ]
63 then
64 CLASSPATH=$f
65 else
66 CLASSPATH=$CLASSPATH:$f
67 fi
68done
69
70export CLASSPATH
71
72if [ "$#" == "0" ];
73then
74 $TERRIER_HOME/bin/anyclass.sh -Dorg.mortbay.util.FileResource.checkAliases=false org.terrier.utility.SimpleJettyHTTPServer 8080 $TERRIER_HOME/src/webapps/simple/
75else
76 $TERRIER_HOME/bin/anyclass.sh -Dorg.mortbay.util.FileResource.checkAliases=false org.terrier.utility.SimpleJettyHTTPServer $*
77fi
Note: See TracBrowser for help on using the repository browser.