Branch: Tag:

2001-02-01

2001-02-01 02:54:55 by Per Hedbor <ph@opera.com>

Once a --program option has been parsed, just send on the --help and --version arguments to the program instead of showing the version or help. Fixes [Bug 1067 (#1067)]. Also added tests to verify that the startscript keeps on passing the arguments as mentioned above.

Rev: server/etc/test/tests/RoxenTest_base.pike:1.4
Rev: server/etc/test/tests/echo.pike:1.2
Rev: server/start:1.149

1:   #!/bin/sh   # - # $Id: start,v 1.148 2001/01/31 08:04:01 per Exp $ + # $Id: start,v 1.149 2001/02/01 02:53:08 per Exp $      ### If --silent-start is given as the first argument,   ### nothing will be printed to stdout by the script.
220:    '--program')    program="$2"    once=1 +  passhelp=1    shift    ;;    '--cd')
238:    DEFINES="$DEFINES $1"    ;;    '--version') +  if [ "x$passhelp" = "x1" ] ; then +  pass="$pass --version" +  else    if [ -f base_server/roxen.pike ]; then    echo "Roxen WebServer `roxen_version`"    exit 0
245:    echo 'base_server/roxen.pike not found!'    exit 1    fi +  fi    ;;    '--self-test')    setup_for_tests
260:    setup_for_tests    ;;    '--help'|'-?') +  if [ "x$passhelp" = "x1" ] ; then +  pass="$pass --help" +  else    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 WebServerB..   
408:   EOF    tput 'rmso' 2>/dev/null    exit 0 +  fi    ;;    *)    pass="$pass $1"