Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.78 1999/09/10 22:08:15 mast Exp $ + # $Id: start,v 1.79 1999/10/08 17:20:34 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
Roxen.git/server/start:63:      remove_old_dot_o_files () {    echo "$pre Removing old .o files ($1)"    > "$roxendir/.remove_dumped_mark"    find . -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"    ;;    -l*) -  DEFINES="$DEFINES $1" +  ARGS="$DEFINES $1"    ;;   # Used by the 'install' script    --truss)    pike="truss $pike"    ;;    --truss-c)    pike="truss -c $pike"    ;;    --log-dir=*)    LOGDIR=`echo $1 | sed -e 's/--log-dir=//'`
Roxen.git/server/start:153:    once=1    shift    ;;    '--cd')    cd_to="$2"    # Use the absolute path...    roxendir="`pwd`"    once=1    shift    ;; -  -D*|-d*|-s*|-M*|-I*|-P*|-t*) +  -d*|-t*|-l*)    # 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 <base_server/roxen.pike -e'/__roxen_version__/s/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`"    BUILD="`sed <base_server/roxen.pike -e'/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -ed | head -1`"    echo "Roxen Challenger $VERSION.$BUILD"    exit 0    else    echo 'base_server/roxen.pike not found!'
Roxen.git/server/start:398:   # 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$DIR" != "x../configurations/" ] ; then -  args="$DEFINES $program --config-dir=$DIR $pass" +  args="$DEFINES $ARGS $program --config-dir=$DIR $pass"    else -  args="$DEFINES $program $pass" +  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    echo "$pre" "Executing $pike $args $@"|sed -e "s!`pwd`!.!g"    else :; fi    $pike $args $@    else
Roxen.git/server/start:438:    DEBUG="-DDEBUG -DMODULE_DEBUG"   fi      if [ "x$debug" = "x-1" ] ; then    DEBUG="";   else :; fi      DEFINES="$DEBUG $DEFINES"   PIKEVERSION=`$pike --version 2>&1`    +  + if [ "$program" = "base_server/roxenloader.pike" ] ; then    if [ "`cat .old_roxen_defines 2>/dev/null`" != "$PIKEVERSION $DEFINES" ] ; then    remove_old_dot_o_files "DEFINES changed"    fi -  +     echo "$PIKEVERSION $DEFINES" > .old_roxen_defines -  + fi      if [ -z "$once" ] ; then    if [ $verbose -gt 0 ]; then    echo "$pre" Starting the Roxen Challenger World Wide Web server.    else :; fi    ./mkdir -p $LOGDIR/debug/       if [ $verbose -gt 0 ]; then    cat << oo   Using configuration from $DIR, storing the debug log in $LOGDIR/debug/$FILES.1