Roxen.git / server / start

version» Context lines:

Roxen.git/server/start:1:   #!/bin/sh   # - # $Id: start,v 1.121 2000/08/17 01:16:06 per Exp $ + # $Id: start,v 1.122 2000/08/29 23:28:32 mast Exp $      pre="`echo \" $$ \" | sed -e 's/\(.........\)\(.*\)/\1/g'` :"      dp() {    echo "$pre" "$@" 2>&1   }      # Breaks on linux when using symlinks.   dn="`dirname $0`"   case "$dn" in
Roxen.git/server/start:38:    dp "Creating directory $VARDIR"    mkdir $VARDIR || exit 1   fi      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' -n | head -1`"    BUILD="`sed <etc/include/version.h -e '/__roxen_build__/s/[^0-9]*\([0-9][0-9]*\)[^0-9]*/\1/p' -n | head -1`"    echo $VERSION.$BUILD   }    + fullpath() { +  ( +  IFS=: +  for path in $PATH ; do +  if [ -x "$path/$1" ] ; then +  full="$path/$1" +  break +  fi +  done +  test "x$full" != "x" && echo $full +  ) + } +    pcdir="$VARDIR/`roxen_version`/precompiled/`uname -m`.`uname -r`"   old_roxen_defines="$pcdir/old_roxen_defines"   ./mkdir -p $pcdir   chmod 1777 $pcdir      # Default verbosity level.   verbose=1      # Do not default to using a relative path.   roxendir="`pwd`"      # Locate Pike binary. - pike=`type pike 2>/dev/null|head -1|sed -e 's,.*is ,,'` + pike=`fullpath pike`   if [ -x bin/pike ] ; then pike=$roxendir/bin/pike; fi   if [ -x bin/roxen ] ; then pike=$roxendir/bin/roxen; fi   if [ -x $LOCALDIR/bin/pike ] ; then pike=$LOCALDIR/bin/pike; fi   if [ -x $LOCALDIR/bin/roxen ] ; then pike=$LOCALDIR/bin/roxen; fi   if [ "x$PIKE" = "x" ]; then :; else    if [ -x "$PIKE" ]; then pike="$PIKE"; -  else dp "$PIKE is not executable."; fi +  else +  pikepath=`fullpath "$PIKE"` +  if [ "x$pikepath" != "x" ]; then pike="$pikepath"; +  else dp "$PIKE is not executable - ignored."; fi    fi -  + fi         if [ x"$pike" = "x" ] ; then    dp "No pike binary found. Aborting."    exit 1   fi      if [ ! -f "$pike" ] ; then    dp "No pike binary found. Aborting."    exit 1
Roxen.git/server/start:431:      ####### BEGIN PIKE OPTIONS      # Roxen will create files as the initial user,   # which it expects to be able to read as the run-time user.   umask 022      if [ "x$PIKE_NO_DEFAULT_PATHS" = "x" ]; then    # Pike default Master-program    if [ "x$PIKE_MASTER" = "x" ]; then -  if [ -d share/pike ]; then -  # This is used with localinstall -  DEFINES="$DEFINES -I$roxendir/share/pike/include" -  PIKE_MODULE_PATH="$PIKE_MODULE_PATH:$roxendir/share/pike/modules" -  fi +     if [ -f lib/master.pike ]; then -  DEFINES="$DEFINES -m$roxendir/lib/master.pike -I$roxendir/lib/include" -  PIKE_MODULE_PATH="$PIKE_MODULE_PATH:$roxendir/lib/modules:$roxendir/share/modules" +  DEFINES="$DEFINES -m$roxendir/lib/master.pike"    elif [ -f lib/pike/master.pike ]; then -  DEFINES="$DEFINES -m$roxendir/lib/pike/master.pike -I$roxendir/lib/pike/include" -  PIKE_MODULE_PATH="$PIKE_MODULE_PATH:$roxendir/lib/pike/modules:$roxendir/share/pike/modules" +  DEFINES="$DEFINES -m$roxendir/lib/pike/master.pike"    fi -  export PIKE_MODULE_PATH +     else    # This is useful when using several different Pikes.    # Specify include and module paths with    # PIKE_INCLUDE_PATH and PIKE_MODULE_PATH    # they are handled automatically by the master,    # so no need to do it here.    DEFINES="$DEFINES -m$PIKE_MASTER"    fi   fi   
Roxen.git/server/start:554:    cd $cd_to    fi    if [ "x$gdb" = "xno" ]; then    if [ $verbose -gt 0 ]; then    if [ $verbose -gt 1 -o -z "$once" ] ; then    dp "Executing $pike $args $@"|sed -e "s!`pwd`!.!g"    else    dp "Using '$pike'"|sed -e "s!`pwd`!.!g"    fi    fi -  $pike $args $@ +  $pike $args "$@"    else -  dp "Executing gdb $pike $args $@" +     echo >.gdbinit handle SIGPIPE nostop noprint pass    echo >>.gdbinit handle SIGUSR1 nostop noprint pass    echo >>.gdbinit handle SIGUSR2 nostop noprint pass    echo >>.gdbinit handle SIGLWP nostop noprint pass -  +  firstline=`head -1 "$pike" 2>/dev/null` +  if expr "x$firstline" : 'x#! */.*' >/dev/null; then +  # Looks like a script. gdb won't grok it, so we try passing +  # --gdb to it instead (which works in the special case of the +  # bin/pike script that's built by the top level Makefile in the +  # Pike source tree). +  dp "Executing $pike --gdb $args $@" +  $pike --gdb $args "$@" +  else +  dp "Executing gdb $pike $args $@"    echo >>.gdbinit run $args $@    gdb $pike -  +  fi    rm .gdbinit    fi   }      #   # Now do the stuff   #   PIKEVERSION=`$pike --version 2>&1`