Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.98 2000/03/10 18:07:22 mast Exp $ + # $Id: start,v 1.99 2000/03/13 06:08:25 per Exp $      pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` :"      cd `dirname $0`      # Can be set with '--config-dir=DIR'   DIR=../configurations/   LOGDIR=../logs/   FILES="default"   program=base_server/roxenloader.pike   extra_args=""    - pcdir="precompiled/`uname -m`.`uname -r`" + roxen_version() { +  VERSION="`sed <etc/include/version.h -e'/__roxen_version__/s/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" +  BUILD="`sed <etc/include/version.h -e'/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" +  echo $VERSION.$BUILD + } +  + pcdir="../var/`roxen_version`/precompiled/`uname -m`.`uname -r`"   old_roxen_defines="$pcdir/old_roxen_defines"   ./mkdir -p $pcdir      # Default verbosity level.   verbose=1      # Do not default to using a relative path.   roxendir="`pwd`"      # Set up environment
Roxen.git/server/start:29:   fi      # Make sure $CLASSPATH contains the servlet stuff   CLASSPATH=java/classes/roxen_module.jar:java/classes/roxen_servlet.jar:java/classes/servlet.jar:java/classes${CLASSPATH:+:}$CLASSPATH   export CLASSPATH         pike=`type pike|head -1|sed -e 's,.*is ,,'`   if [ -x bin/pike ] ; then pike=$roxendir/bin/pike; fi   if [ -x bin/roxen ] ; then pike=$roxendir/bin/roxen; fi + if [ -x ../local/bin/pike ] ; then pike=$roxendir/../local/bin/pike; fi + if [ -x ../local/bin/roxen ] ; then pike=$roxendir/../local/bin/roxen; fi   if [ "x$PIKE" = "x" ]; then :; else    if [ -x "$PIKE" ]; then pike="$PIKE"; fi   fi         if [ x"$pike" = "x" ] ; then    echo "No pike binary found. Aborting."    exit 1   fi   
Roxen.git/server/start:67:    fi   fi      gdb=no      remove_old_dot_o_files () {    echo "$pre Removing old .o files ($1)"    find $pcdir -name '*.o' | xargs rm -f   }    -  +    ## Parse all arguments.   ## GNU-style, long options only, except for -D, simply passed on.   ARGS=""      parse_args() {    while [ ! c"$1" = "c" ] ; do    case $1 in    -D*)    DEFINES="$DEFINES $1"    ;;
Roxen.git/server/start:136:    DEFINES="-DKEEP_ALIVE $DEFINES"    ;;    '--quiet'|'-q')    verbose=0    ;;    '--verbose'|'-v')    verbose=2    debug=1    ;;    '--remove-dumped') -  remove_old_dot_o_files "user request" +  remove_dumped=1;    ;;    '--once')    once=1    ;;   # Misspelling --once might give undesirable results, so let's accept   # some "creative" spellings... :-)    '--onve'|'--onec'|'--onev')    once=1    ;;    '--gdb')
Roxen.git/server/start:172:    -r*|-d*|-t*|-l*|-w*)    # Argument passed along to Pike.    ARGS="$ARGS $1"    ;;    -D*|-M*|-I*|-P*)    # Argument passed along to Pike.    DEFINES="$DEFINES $1"    ;;    '--version')    if [ -f base_server/roxen.pike ]; then -  VERSION="`sed <etc/include/version.h -e'/__roxen_version__/s/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" -  BUILD="`sed <etc/include/version.h -e'/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`" -  echo "Roxen $VERSION.$BUILD" +  echo "Roxen `roxen_version`"    exit 0    else    echo 'base_server/roxen.pike not found!'    exit 1    fi    ;;    '--help'|'-?')    sed -e "s/\\.B/`tput 'bold' 2>/dev/null`/g" -e "s/B\\./`tput 'sgr0' 2>/dev/null`/g" << EOF   .BThis command will start the Roxen serverB..   
Roxen.git/server/start:388:   # Extra module-path   if [ -d etc/modules ]; then    DEFINES="$DEFINES -M$roxendir/etc/modules"   fi      # Extra include-path   if [ -d etc/include ]; then    DEFINES="$DEFINES -I$roxendir/etc/include"   fi    + if [ -d ../local/include ]; then +  DEFINES="$DEFINES -I$roxendir/../local/include" + fi +    # Extra include-path (2)   if [ -d base_server ]; then    DEFINES="$DEFINES -I$roxendir/base_server"   fi    -  + if [ -d ../local/base_server ]; then +  DEFINES="$DEFINES -I$roxendir/../local/base_server -P$roxendir/../local/base_server" + fi +    # Extra program-path   DEFINES="$DEFINES -P`pwd`"      # Support for adding local pike-modules   if [ -d ../local/etc/. ]; then    # Extra module-path    if [ -d ../local/etc/modules/. ]; then    DEFINES="$DEFINES -M$roxendir/../local/etc/modules"    fi   
Roxen.git/server/start:451:   #   # Some useful functions   #      rotate () {    b=5;    for a in 4 3 2 1 ; do mv -f $1.$a $1.$b 2> /dev/null; b=$a; done   }      start_roxen() { +  if [ x$remove_dumped = x1 ] ; then +  remove_old_dot_o_files "user request" +  fi    if [ "x$DIR" != "x../configurations/" ] ; then    args="$DEFINES $ARGS $program --config-dir=$DIR $pass"    else    args="$DEFINES $ARGS $program $pass"    fi    if [ x$cd_to != x ] ; then    cd $cd_to    fi    if [ "x$gdb" = "xno" ]; then    if [ $verbose -gt 0 ]; then