OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   11-Feb-2003 14:07:16
  Branch: HEAD                             Handle: 2003021113071302

  Modified files:
    openpkg-src/openpkg     openpkg.spec shtool
    openpkg-web             news.txt

  Log:
    Aaaaannnd risk: GNU shtool 2.0b0 (developer snapshot)

  Summary:
    Revision    Changes     Path
    1.134       +2  -2      openpkg-src/openpkg/openpkg.spec
    1.5         +256 -196   openpkg-src/openpkg/shtool
    1.3264      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/openpkg.spec
  ============================================================================
  $ cvs diff -u -r1.133 -r1.134 openpkg.spec
  --- openpkg-src/openpkg/openpkg.spec  5 Feb 2003 14:32:26 -0000       1.133
  +++ openpkg-src/openpkg/openpkg.spec  11 Feb 2003 13:07:15 -0000      1.134
  @@ -39,8 +39,8 @@
   #   o any cc(1)
   
   #   the package version and release
  -%define       V_openpkg 20030205
  -%define       R_openpkg 20030205
  +%define       V_openpkg 20030211
  +%define       R_openpkg 20030211
   
   #   the used software versions
   %define       V_rpm     4.0.2
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/shtool
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 shtool
  --- openpkg-src/openpkg/shtool        4 Sep 2002 10:06:26 -0000       1.4
  +++ openpkg-src/openpkg/shtool        11 Feb 2003 13:07:15 -0000      1.5
  @@ -1,12 +1,12 @@
   #!/bin/sh
   ##
   ##  GNU shtool -- The GNU Portable Shell Tool
  -##  Copyright (c) 1994-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 1994-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
   ##
   ##  See http://www.gnu.org/software/shtool/ for more information.
   ##  See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
   ##
  -##  Version:  1.6.0 (01-Feb-2002)
  +##  Version:  2.0b0 (11-Feb-2003)
   ##  Contents: all available modules
   ##
   
  @@ -65,8 +65,8 @@
       exit 1
   fi
   if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
  -    echo "This is GNU shtool, version 1.6.0 (01-Feb-2002)"
  -    echo "Copyright (c) 1994-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>"
  +    echo "This is GNU shtool, version 2.0b0 (11-Feb-2003)"
  +    echo "Copyright (c) 1994-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>"
       echo "Report bugs to <[EMAIL PROTECTED]>"
       echo ''
       echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
  @@ -86,18 +86,19 @@
       echo '  prop     [-p|--prefix <str>]'
       echo '  move     [-v|--verbose] [-t|--trace] [-e|--expand] [-p|--preserve]'
       echo '           <src-file> <dst-file>'
  -    echo '  install  [-v|--verbose] [-t|--trace] [-c|--copy] [-C|--compare-copy]'
  -    echo '           [-s|--strip] [-m|--mode <mode>] [-o|--owner <owner>]'
  -    echo '           [-g|--group <group>] [-e|--exec <sed-cmd>] <file> [<file>'
  -    echo '           ...] <path>'
  +    echo '  install  [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy]'
  +    echo '           [-C|--compare-copy] [-s|--strip] [-m|--mode <mode>]'
  +    echo '           [-o|--owner <owner>] [-g|--group <group>] [-e|--exec'
  +    echo '           <sed-cmd>] <file> [<file> ...] <path>'
       echo '  mkdir    [-t|--trace] [-f|--force] [-p|--parents] [-m|--mode'
  -    echo '           <mode>] <dir> [<dir> ...]'
  +    echo '           <mode>] [-o|--owner <owner>] [-g|--group <group>] <dir>'
  +    echo '           [<dir> ...]'
       echo '  mkln     [-t|--trace] [-f|--force] [-s|--symbolic] <src-path>'
       echo '           [<src-path> ...] <dst-path>'
       echo '  mkshadow [-v|--verbose] [-t|--trace] [-a|--all] <src-dir> <dst-dir>'
       echo '  fixperm  [-v|--verbose] [-t|--trace] <path> [<path> ...]'
       echo '  rotate   [-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files'
  -    echo '           <count>] [-s|--min-size <size>] [-c|--copy] [-r|--remove]'
  +    echo '           <count>] [-s|--size <size>] [-c|--copy] [-r|--remove]'
       echo '           [-a|--archive-dir <dir>] [-z|--compress [<tool>:]<level>]'
       echo '           [-b|--background] [-d|--delay] [-p|--pad <len>] [-o|--owner'
       echo '           <owner>] [-g|--group <group>] [-m|--mode <mode>] [-M|--migrate'
  @@ -127,7 +128,7 @@
       exit 0
   fi
   if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
  -    echo "GNU shtool 1.6.0 (01-Feb-2002)"
  +    echo "GNU shtool 2.0b0 (11-Feb-2003)"
       exit 0
   fi
   if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
  @@ -213,12 +214,13 @@
           ;;
       install )
           str_tool="install"
  -        str_usage="[-v|--verbose] [-t|--trace] [-c|--copy] [-C|--compare-copy] 
[-s|--strip] [-m|--mode <mode>] [-o|--owner <owner>] [-g|--group <group>] [-e|--exec 
<sed-cmd>] <file> [<file> ...] <path>"
  -        arg_spec="2+"
  -        opt_spec="v.t.c.C.s.m:o:g:e+"
  -        
opt_alias="v:verbose,t:trace,c:copy,C:compare-copy,s:strip,m:mode,o:owner,g:group,e:exec"
  +        str_usage="[-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy] 
[-C|--compare-copy] [-s|--strip] [-m|--mode <mode>] [-o|--owner <owner>] [-g|--group 
<group>] [-e|--exec <sed-cmd>] <file> [<file> ...] <path>"
  +        arg_spec="1+"
  +        opt_spec="v.t.d.c.C.s.m:o:g:e+"
  +        
opt_alias="v:verbose,t:trace,d:mkdir,c:copy,C:compare-copy,s:strip,m:mode,o:owner,g:group,e:exec"
           opt_v=no
           opt_t=no
  +        opt_d=no
           opt_c=no
           opt_C=no
           opt_s=no
  @@ -229,14 +231,16 @@
           ;;
       mkdir )
           str_tool="mkdir"
  -        str_usage="[-t|--trace] [-f|--force] [-p|--parents] [-m|--mode <mode>] 
<dir> [<dir> ...]"
  +        str_usage="[-t|--trace] [-f|--force] [-p|--parents] [-m|--mode <mode>] 
[-o|--owner <owner>] [-g|--group <group>] <dir> [<dir> ...]"
           arg_spec="1+"
  -        opt_spec="t.f.p.m:"
  -        opt_alias="t:trace,f:force,p:parents,m:mode"
  +        opt_spec="t.f.p.m:o:g:"
  +        opt_alias="t:trace,f:force,p:parents,m:mode,o:owner,g:group"
           opt_t=no
           opt_f=no
           opt_p=no
           opt_m=""
  +        opt_o=""
  +        opt_g=""
           ;;
       mkln )
           str_tool="mkln"
  @@ -269,10 +273,10 @@
           ;;
       rotate )
           str_tool="rotate"
  -        str_usage="[-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files 
<count>] [-s|--min-size <size>] [-c|--copy] [-r|--remove] [-a|--archive-dir <dir>] 
[-z|--compress [<tool>:]<level>] [-b|--background] [-d|--delay] [-p|--pad <len>] 
[-o|--owner <owner>] [-g|--group <group>] [-m|--mode <mode>] [-M|--migrate <cmd>] 
[-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]"
  +        str_usage="[-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files 
<count>] [-s|--size <size>] [-c|--copy] [-r|--remove] [-a|--archive-dir <dir>] 
[-z|--compress [<tool>:]<level>] [-b|--background] [-d|--delay] [-p|--pad <len>] 
[-o|--owner <owner>] [-g|--group <group>] [-m|--mode <mode>] [-M|--migrate <cmd>] 
[-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]"
           arg_spec="1+"
           opt_spec="v.t.f.n:s:c.r.a:z:b.d.p:o:g:m:M:P:E:"
  -        
opt_alias="v:verbose,t:trace,f:force,n:num-files,s:size,m:min-size,c:copy,r:remove,a:archive-dir,z:compress,b:background,d:delay,p:pad,o:owner,g:group,m:mode,M:migrate,P:prolog,E:epilog"
  +        
opt_alias="v:verbose,t:trace,f:force,n:num-files,s:size,c:copy,r:remove,a:archive-dir,z:compress,b:background,d:delay,p:pad,o:owner,g:group,m:mode,M:migrate,P:prolog,E:epilog"
           opt_v=no
           opt_t=no
           opt_f=no
  @@ -563,6 +567,15 @@
       chmod 600 $tmpfile
   fi
   
  +#   cleanup procedure
  +shtool_exit () {
  +    rc="$1"
  +    if [ ".$gen_tmpfile" = .yes ]; then
  +        rm -f $tmpfile >/dev/null 2>&1 || true
  +    fi
  +    exit $rc
  +}
  +
   ##
   ##  DISPATCH INTO SCRIPT BODY
   ##
  @@ -572,7 +585,7 @@
   echo )
       ##
       ##  echo -- Print string with optional construct expansion
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for WML as buildinfo
       ##
       
  @@ -605,7 +618,7 @@
                   term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' 
</dev/null 2>/dev/null`
                   term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' 
</dev/null 2>/dev/null`
                   ;;
  -            vt100|vt100*)
  +            vt100|vt100*|cygwin)
                   term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 
0); }' </dev/null 2>/dev/null`
                   term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' 
</dev/null 2>/dev/null`
                   ;;
  @@ -623,7 +636,7 @@
                                   fi
                               done
                               if [ ".$term_bold" != . ]; then
  -                                for seq in sgr0 me rmso reset; do # 'reset' is last
  +                                for seq in sgr0 me rmso init reset; do # 'reset' is 
last
                                       norm="`$dir/$tool $seq 2>/dev/null`"
                                       if [ ".$norm" != . ]; then
                                           term_norm="$norm"
  @@ -642,6 +655,8 @@
           esac
           if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
               echo "$msgprefix:Warning: unable to determine terminal sequence for 
bold mode" 1>&2
  +            term_bold=''
  +            term_norm=''
           fi
       fi
       
  @@ -741,13 +756,13 @@
       if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
           if [ ".$domainname" = . ]; then
               if [ -f /etc/resolv.conf ]; then
  -                domainname="`egrep '^[       ]*domain' /etc/resolv.conf | head -1 |\
  +                domainname="`egrep '^[       ]*domain' /etc/resolv.conf | sed -e 
'q' |\
                                sed -e 's/.*domain//' \
                                    -e 's/^[    ]*//' -e 's/^ *//' -e 's/^      *//' \
                                    -e 's/^\.//' -e 's/^/./' |\
                                awk '{ printf("%s", $1); }'`"
                   if [ ".$domainname" = . ]; then
  -                    domainname="`egrep '^[   ]*search' /etc/resolv.conf | head -1 |\
  +                    domainname="`egrep '^[   ]*search' /etc/resolv.conf | sed -e 
'q' |\
                                    sed -e 's/.*search//' \
                                        -e 's/^[        ]*//' -e 's/^ *//' -e 's/^     
 *//' \
                                        -e 's/ .*//' -e 's/     .*//' \
  @@ -834,12 +849,12 @@
           [dmy][dmy][dmy] )
               ;;
           * ) echo "$msgprefix:Error: invalid argument to option \`-o': $opt_o" 1>&2
  -            exit 1
  +            shtool_exit 1
               ;;
       esac
       if [ ! -r "$fod" ]; then
           echo "$msgprefix:Error: file or directory not found: $fod" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   prevent "date" giving response in another language
  @@ -949,17 +964,17 @@
   table )
       ##
       ##  table -- Pretty-print a field-separated list as a table
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for Apache
       ##
       
       if [ $opt_c -gt 4 ]; then
           echo "$msgprefix:Error: Invalid number of colums (1..4 allowed only)" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       case "x$opt_F" in
           x? ) ;;
  -        *  ) echo "$msgprefix:Error: Invalid separator (one char allowed only)" 
1>&2; exit 1 ;;
  +        *  ) echo "$msgprefix:Error: Invalid separator (one char allowed only)" 
1>&2; shtool_exit 1 ;;
       esac
       
       #   split the list into a table
  @@ -1013,7 +1028,7 @@
   prop )
       ##
       ##  prop -- Display progress with a running propeller
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for mod_ssl
       ##
       
  @@ -1058,7 +1073,7 @@
   move )
       ##
       ##  move -- Move files with simultaneous substitution
  -    ##  Copyright (c) 1999-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1999-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for shtool
       ##
       
  @@ -1068,11 +1083,11 @@
       #   consistency checks
       if [ ".$src" = . -o ".$dst" = . ]; then
           echo "$msgprefix:Error: Invalid arguments" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       if [ ".$src" = ".$dst" ]; then
           echo "$msgprefix:Error: Source and destination files are the same" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       expsrc="$src"
       if [ ".$opt_e" = .yes ]; then
  @@ -1081,20 +1096,20 @@
       if [ ".$opt_e" = .yes ]; then
           if [ ".`echo "$src" | sed -e 's;^.*\\*.*$;;'`" = ".$src" ]; then
               echo "$msgprefix:Error: Source doesn't contain wildcard ('*'): $dst" 
1>&2
  -            exit 1
  +            shtool_exit 1
           fi
           if [ ".`echo "$dst" | sed -e 's;^.*%[1-9].*$;;'`" = ".$dst" ]; then
               echo "$msgprefix:Error: Destination doesn't contain substitution 
('%N'): $dst" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
           if [ ".$expsrc" = ".$src" ]; then
               echo "$msgprefix:Error: Sources not found or no asterisk : $src" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       else
           if [ ! -r "$src" ]; then
               echo "$msgprefix:Error: Source not found: $src" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       fi
       
  @@ -1144,16 +1159,38 @@
               break;
           fi
       done
  -    exit $errorstatus
  +    shtool_exit $errorstatus
       ;;
   
   install )
       ##
       ##  install -- Install a program, script or datafile
  -    ##  Copyright (c) 1997-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1997-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for shtool
       ##
       
  +    #   special case: "shtool install -d <dir> [...]" internally
  +    #   maps to "shtool mkdir -f -p -m 755 <dir> [...]"
  +    if [ "$opt_d" = yes ]; then
  +        cmd="$0 mkdir -f -p -m 755"
  +        if [ ".$opt_o" != . ]; then
  +            cmd="$cmd -o '$opt_o'"
  +        fi
  +        if [ ".$opt_g" != . ]; then
  +            cmd="$cmd -g '$opt_g'"
  +        fi
  +        if [ ".$opt_v" = .yes ]; then
  +            cmd="$cmd -v"
  +        fi
  +        if [ ".$opt_t" = .yes ]; then
  +            cmd="$cmd -t"
  +        fi
  +        for dir in "$@"; do
  +            eval "$cmd $dir" || shtool_exit $?
  +        done
  +        shtool_exit 0
  +    fi
  +    
       #   determine source(s) and destination
       argc=$#
       srcs=""
  @@ -1173,7 +1210,7 @@
       #   consistency check for destination
       if [ $argc -gt 2 -a $dstisdir = 0 ]; then
           echo "$msgprefix:Error: multiple sources require destination to be 
directory" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   iterate over all source(s)
  @@ -1215,12 +1252,12 @@
               if [ ".$opt_t" = .yes ]; then
                   echo "cp $src $dsttmp" 1>&2
               fi
  -            cp $src $dsttmp || exit $?
  +            cp $src $dsttmp || shtool_exit $?
           else
               if [ ".$opt_t" = .yes ]; then
                   echo "mv $src $dsttmp" 1>&2
               fi
  -            mv $src $dsttmp || exit $?
  +            mv $src $dsttmp || shtool_exit $?
           fi
       
           #   adjust the target file
  @@ -1232,32 +1269,32 @@
                   sed="$sed -e '$e'"
               done
               cp $dsttmp $dsttmp.old
  -            eval "$sed <$dsttmp.old >$dsttmp" || exit $?
  +            eval "$sed <$dsttmp.old >$dsttmp" || shtool_exit $?
               rm -f $dsttmp.old
           fi
           if [ ".$opt_s" = .yes ]; then
               if [ ".$opt_t" = .yes ]; then
                   echo "strip $dsttmp" 1>&2
               fi
  -            strip $dsttmp || exit $?
  +            strip $dsttmp || shtool_exit $?
           fi
           if [ ".$opt_o" != . ]; then
               if [ ".$opt_t" = .yes ]; then
                   echo "chown $opt_o $dsttmp" 1>&2
               fi
  -            chown $opt_o $dsttmp || exit $?
  +            chown $opt_o $dsttmp || shtool_exit $?
           fi
           if [ ".$opt_g" != . ]; then
               if [ ".$opt_t" = .yes ]; then
                   echo "chgrp $opt_g $dsttmp" 1>&2
               fi
  -            chgrp $opt_g $dsttmp || exit $?
  +            chgrp $opt_g $dsttmp || shtool_exit $?
           fi
           if [ ".$opt_m" != ".-" ]; then
               if [ ".$opt_t" = .yes ]; then
                   echo "chmod $opt_m $dsttmp" 1>&2
               fi
  -            chmod $opt_m $dsttmp || exit $?
  +            chmod $opt_m $dsttmp || shtool_exit $?
           fi
       
           #   determine whether to do a quick install
  @@ -1289,7 +1326,7 @@
   mkdir )
       ##
       ##  mkdir -- Make one or more directories
  -    ##  Copyright (c) 1996-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1996-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for public domain by Noah Friedman 
<[EMAIL PROTECTED]>
       ##  Cleaned up and enhanced for shtool
       ##
  @@ -1312,6 +1349,18 @@
                   echo "mkdir $p" 1>&2
               fi
               mkdir $p || errstatus=$?
  +            if [ ".$opt_o" != . ]; then
  +                if [ ".$opt_t" = .yes ]; then
  +                    echo "chown $opt_o $p" 1>&2
  +                fi
  +                chown $opt_o $p || errstatus=$?
  +            fi
  +            if [ ".$opt_g" != . ]; then
  +                if [ ".$opt_t" = .yes ]; then
  +                    echo "chgrp $opt_g $p" 1>&2
  +                fi
  +                chgrp $opt_g $p || errstatus=$?
  +            fi
               if [ ".$opt_m" != . ]; then
                   if [ ".$opt_t" = .yes ]; then
                       echo "chmod $opt_m $p" 1>&2
  @@ -1337,6 +1386,18 @@
                           echo "mkdir $pathcomp" 1>&2
                       fi
                       mkdir $pathcomp || errstatus=$?
  +                    if [ ".$opt_o" != . ]; then
  +                        if [ ".$opt_t" = .yes ]; then
  +                            echo "chown $opt_o $pathcomp" 1>&2
  +                        fi
  +                        chown $opt_o $pathcomp || errstatus=$?
  +                    fi
  +                    if [ ".$opt_g" != . ]; then
  +                        if [ ".$opt_t" = .yes ]; then
  +                            echo "chgrp $opt_g $pathcomp" 1>&2
  +                        fi
  +                        chgrp $opt_g $pathcomp || errstatus=$?
  +                    fi
                       if [ ".$opt_m" != . ]; then
                           if [ ".$opt_t" = .yes ]; then
                               echo "chmod $opt_m $pathcomp" 1>&2
  @@ -1348,13 +1409,13 @@
               done
           fi
       done
  -    exit $errstatus
  +    shtool_exit $errstatus
       ;;
   
   mkln )
       ##
       ##  mkln -- Make link with calculation of relative paths
  -    ##  Copyright (c) 1999-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1999-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for shtool
       ##
       
  @@ -1368,7 +1429,7 @@
       if [ ! -d $dst ]; then
           if [ $args -gt 2 ]; then
               echo "$msgprefix:Error: multiple sources not allowed when target isn't 
a directory" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       fi
       
  @@ -1415,7 +1476,7 @@
           if [ ".$dstdir" != . ]; then
               if [ ! -d $dstdir ]; then
                   echo "$msgprefix:Error: destination directory not found: $dstdir" 
1>&2
  -                exit 1
  +                shtool_exit 1
               fi
           fi
       
  @@ -1493,7 +1554,7 @@
   mkshadow )
       ##
       ##  mkshadow -- Make a shadow tree through symbolic links
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for Apache
       ##
       
  @@ -1504,7 +1565,7 @@
       #   check whether source exists
       if [ ! -d $src ]; then
           echo "$msgprefix:Error: source directory not found: \`$src'" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   determine if one of the paths is an absolute path,
  @@ -1610,7 +1671,7 @@
   fixperm )
       ##
       ##  fixperm -- Fix file permissions inside a source tree
  -    ##  Copyright (c) 1996-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1996-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for ePerl
       ##
       
  @@ -1629,31 +1690,31 @@
               if [ -f $file ]; then
                   if [ $minusx $file ]; then
                       if [ ".$opt_v" = .yes ]; then
  -                        echo "-rwxrwxr-x $file" 2>&1
  +                        echo "-rwxr-xr-x $file" 2>&1
                       fi
                       if [ ".$opt_t" = .yes ]; then
  -                        echo "chmod 775 $file" 2>&1
  +                        echo "chmod 755 $file" 2>&1
                       fi
  -                    chmod 775 $file
  +                    chmod 755 $file
                   else
                       if [ ".$opt_v" = .yes ]; then
  -                        echo "-rw-rw-r-- $file" 2>&1
  +                        echo "-rw-r--r-- $file" 2>&1
                       fi
                       if [ ".$opt_t" = .yes ]; then
  -                        echo "chmod 664 $file" 2>&1
  +                        echo "chmod 644 $file" 2>&1
                       fi
  -                    chmod 664 $file
  +                    chmod 644 $file
                   fi
                   continue
               fi
               if [ -d $file ]; then
                   if [ ".$opt_v" = .yes ]; then
  -                    echo "drwxrwxr-x $file" 2>&1
  +                    echo "drwxr-xr-x $file" 2>&1
                   fi
                   if [ ".$opt_t" = .yes ]; then
  -                    echo "chmod 775 $file" 2>&1
  +                    echo "chmod 755 $file" 2>&1
                   fi
  -                chmod 775 $file
  +                chmod 755 $file
                   continue
               fi
               if [ ".$opt_v" = .yes ]; then
  @@ -1666,14 +1727,14 @@
   rotate )
       ##
       ##  rotate -- Logfile rotation
  -    ##  Copyright (c) 2001-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 2001-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for use in OpenPKG
       ##
       
       #   make sure we have at least one file to rotate
       if [ ".$opt_n" = .0 ]; then
           echo "$msgprefix:Error: invalid argument \`$opt_n' to option -n." 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   canonicalize -s option argument
  @@ -1691,14 +1752,14 @@
               opt_s=`expr $opt_s \* 1073741824` # 1024*1024*1024
           else
               echo "$msgprefix:Error: invalid argument \`$opt_s' to option -s." 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       fi
       
       #   option -d/-z consistency
       if [ ".$opt_d" = .yes -a ".$opt_z" = . ]; then
           echo "$msgprefix:Error: option -d requires option -z." 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   make sure target directory exists
  @@ -1706,14 +1767,14 @@
           if [ ! -d $opt_a ]; then
               if [ ".$opt_f" = .no ]; then
                   echo "$msgprefix:Error: archive directory \`$opt_a' does not 
exist." 1>&2
  -                exit 1
  +                shtool_exit 1
               fi
  -            mkdir $opt_a || exit $?
  +            mkdir $opt_a || shtool_exit $?
               chmod 755 $opt_a
           fi
           if [ ! -w $opt_a ]; then
               echo "$msgprefix:Error: archive directory \`$opt_a' not writable." 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       fi
       
  @@ -1731,7 +1792,7 @@
               [0-9] )
                   ;;
               * ) echo "$msgprefix:Error: invalid compression level \`$comp_lvl'" 1>&2
  -                exit 1
  +                shtool_exit 1
                   ;;
           esac
       
  @@ -1761,7 +1822,7 @@
               done
               if [ ".$comp_prg" = . ]; then
                   echo "$msgprefix:Error: no suitable compression tool found in 
\$PATH" 1>&2
  -                exit 1
  +                shtool_exit 1
               fi
           fi
       
  @@ -1772,7 +1833,7 @@
               */gzip     | gzip     ) comp_ext="gz"  comp_lvl="-$comp_lvl" ;;
               */compress | compress ) comp_ext="Z";  comp_lvl=""           ;;
               * ) echo "$msgprefix:Error: tool \`$comp_prg' is not a known 
compression tool" 1>&2
  -                exit 1
  +                shtool_exit 1
                   ;;
           esac
           comp_suf=".$comp_ext"
  @@ -1786,7 +1847,7 @@
                   continue
               fi
               echo "$msgprefix:Error: logfile \`$file' not found" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
       
           #   determine log directory (where original logfile is placed)
  @@ -1831,7 +1892,7 @@
                   echo "$opt_P"
               fi
               eval $opt_P
  -            [ $? -ne 0 ] && exit $?
  +            [ $? -ne 0 ] && shtool_exit $?
           fi
       
           #   kick away out-rotated logfile
  @@ -1844,13 +1905,13 @@
                       echo "$opt_M ${adir}/${file}.${n}${comp_suf}"
                   fi
                   eval "$opt_M ${adir}/${file}.${n}${comp_suf}"
  -                [ $? -ne 0 ] && exit $?
  +                [ $? -ne 0 ] && shtool_exit $?
               fi
               #   finally get rid of the out-rotated logfile
               if [ ".$opt_t" = .yes ]; then
                   echo "rm -f ${adir}/${file}.${n}${comp_suf}"
               fi
  -            rm -f ${adir}/${file}.${n}${comp_suf} || exit $?
  +            rm -f ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
           fi
       
           #   rotate already archived logfiles
  @@ -1869,14 +1930,14 @@
                       if [ ".$opt_t" = .yes ]; then
                           echo "mv ${adir}/${file}.${n} ${adir}/${file}.${m}"
                       fi
  -                    mv ${adir}/${file}.${n} ${adir}/${file}.${m} || exit $?
  +                    mv ${adir}/${file}.${n} ${adir}/${file}.${m} || shtool_exit $?
                       if [ ".$opt_t" = .yes ]; then
                           echo "(${comp_prg} ${comp_lvl} <${adir}/${file}.${m} 
>${adir}/${file}.${m}${comp_suf}; rm -f ${adir}/${file}.${m}) &"
                       fi
                       ( ${comp_prg} ${comp_lvl} \
                             <${adir}/${file}.${m} \
  -                          >${adir}/${file}.${m}${comp_suf} || exit $?
  -                      rm -f ${adir}/${file}.${m} || exit $?
  +                          >${adir}/${file}.${m}${comp_suf} || shtool_exit $?
  +                      rm -f ${adir}/${file}.${m} || shtool_exit $?
                       ) </dev/null >/dev/null 2>&1 &
                   else
                       if [ ".$opt_t" = .yes ]; then
  @@ -1884,11 +1945,11 @@
                       fi
                       ${comp_prg} ${comp_lvl} \
                           <${adir}/${file}.${n} \
  -                        >${adir}/${file}.${m}${comp_suf} || exit $?
  +                        >${adir}/${file}.${m}${comp_suf} || shtool_exit $?
                       if [ ".$opt_t" = .yes ]; then
                           echo "rm -f ${adir}/${file}.${n}"
                       fi
  -                    rm -f ${adir}/${file}.${n} || exit $?
  +                    rm -f ${adir}/${file}.${n} || shtool_exit $?
                   fi
       
                   #   fix file attributes
  @@ -1896,19 +1957,19 @@
                       if [ ".$opt_t" = .yes ]; then
                           echo "chown $opt_o ${adir}/${file}.${m}${comp_suf}"
                       fi
  -                    chown $opt_o ${adir}/${file}.${m}${comp_suf} || exit $?
  +                    chown $opt_o ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
                   fi
                   if [ ".$opt_g" != . ]; then
                       if [ ".$opt_t" = .yes ]; then
                           echo "chgrp $opt_g ${adir}/${file}.${m}${comp_suf}"
                       fi
  -                    chgrp $opt_g ${adir}/${file}.${m}${comp_suf} || exit $?
  +                    chgrp $opt_g ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
                   fi
                   if [ ".$opt_m" != . ]; then
                       if [ ".$opt_t" = .yes ]; then
                           echo "chmod $opt_m ${adir}/${file}.${m}${comp_suf}"
                       fi
  -                    chmod $opt_m ${adir}/${file}.${m}${comp_suf} || exit $?
  +                    chmod $opt_m ${adir}/${file}.${m}${comp_suf} || shtool_exit $?
                   fi
               else
                   #   standard case: second and following rotation file
  @@ -1918,7 +1979,7 @@
                   if [ ".$opt_t" = .yes ]; then
                       echo "mv ${adir}/${file}.${n}${comp_suf} 
${adir}/${file}.${m}${comp_suf}"
                   fi
  -                mv ${adir}/${file}.${n}${comp_suf} ${adir}/${file}.${m}${comp_suf} 
|| exit $?
  +                mv ${adir}/${file}.${n}${comp_suf} ${adir}/${file}.${m}${comp_suf} 
|| shtool_exit $?
               fi
           done
       
  @@ -1928,42 +1989,42 @@
               if [ ".$opt_t" = .yes ]; then
                   echo "cp -p ${ldir}/${file} ${adir}/${file}.${n}"
               fi
  -            cp -p ${ldir}/${file} ${adir}/${file}.${n} || exit $?
  +            cp -p ${ldir}/${file} ${adir}/${file}.${n} || shtool_exit $?
               if [ ".$opt_r" = .no ]; then
                   if [ ".$opt_t" = .yes ]; then
                       echo "cp /dev/null ${ldir}/${file}"
                   fi
  -                cp /dev/null ${ldir}/${file} || exit $?
  +                cp /dev/null ${ldir}/${file} || shtool_exit $?
               fi
           else
               #   approach: move[+touch]
               if [ ".$opt_t" = .yes ]; then
                   echo "mv ${ldir}/${file} ${adir}/${file}.${n}"
               fi
  -            mv ${ldir}/${file} ${adir}/${file}.${n} || exit $?
  +            mv ${ldir}/${file} ${adir}/${file}.${n} || shtool_exit $?
               if [ ".$opt_r" = .no ]; then
                   if [ ".$opt_t" = .yes ]; then
                       echo "touch ${ldir}/${file}"
                   fi
  -                touch ${ldir}/${file} || exit $?
  +                touch ${ldir}/${file} || shtool_exit $?
                   #   fix file attributes
                   if [ ".$opt_o" != . ]; then
                       if [ ".$opt_t" = .yes ]; then
                           echo "chown $opt_o ${ldir}/${file}"
                       fi
  -                    chown $opt_o ${ldir}/${file} || exit $?
  +                    chown $opt_o ${ldir}/${file} || shtool_exit $?
                   fi
                   if [ ".$opt_g" != . ]; then
                       if [ ".$opt_t" = .yes ]; then
                           echo "chgrp $opt_g ${ldir}/${file}"
                       fi
  -                    chgrp $opt_g ${ldir}/${file} || exit $?
  +                    chgrp $opt_g ${ldir}/${file} || shtool_exit $?
                   fi
                   if [ ".$opt_m" != . ]; then
                       if [ ".$opt_t" = .yes ]; then
                           echo "chmod $opt_m ${ldir}/${file}"
                       fi
  -                    chmod $opt_m ${ldir}/${file} || exit $?
  +                    chmod $opt_m ${ldir}/${file} || shtool_exit $?
                   fi
               fi
           fi
  @@ -1977,8 +2038,8 @@
                   fi
                   ( ${comp_prg} ${comp_lvl} \
                         <${adir}/${file}.${n} \
  -                      >${adir}/${file}.${n}${comp_suf} || exit $?
  -                  rm -f ${adir}/${file}.${n} || exit $?
  +                      >${adir}/${file}.${n}${comp_suf} || shtool_exit $?
  +                  rm -f ${adir}/${file}.${n} || shtool_exit $?
                   ) </dev/null >/dev/null 2>&1 &
               else
                   if [ ".$opt_t" = .yes ]; then
  @@ -1986,11 +2047,11 @@
                   fi
                   ${comp_prg} ${comp_lvl} \
                       <${adir}/${file}.${n} \
  -                    >${adir}/${file}.${n}${comp_suf} || exit $?
  +                    >${adir}/${file}.${n}${comp_suf} || shtool_exit $?
                   if [ ".$opt_t" = .yes ]; then
                       echo "rm -f ${opt_a}${file}.${n}"
                   fi
  -                rm -f ${adir}/${file}.${n} || exit $?
  +                rm -f ${adir}/${file}.${n} || shtool_exit $?
               fi
       
               #   fix file attributes
  @@ -1998,19 +2059,19 @@
                   if [ ".$opt_t" = .yes ]; then
                       echo "chown $opt_o ${adir}/${file}.${n}${comp_suf}"
                   fi
  -                chown $opt_o ${adir}/${file}.${n}${comp_suf} || exit $?
  +                chown $opt_o ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
               fi
               if [ ".$opt_g" != . ]; then
                   if [ ".$opt_t" = .yes ]; then
                       echo "chgrp $opt_g ${adir}/${file}.${n}${comp_suf}"
                   fi
  -                chgrp $opt_g ${adir}/${file}.${n}${comp_suf} || exit $?
  +                chgrp $opt_g ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
               fi
               if [ ".$opt_m" != . ]; then
                   if [ ".$opt_t" = .yes ]; then
                       echo "chmod $opt_m ${adir}/${file}.${n}${comp_suf}"
                   fi
  -                chmod $opt_m ${adir}/${file}.${n}${comp_suf} || exit $?
  +                chmod $opt_m ${adir}/${file}.${n}${comp_suf} || shtool_exit $?
               fi
           fi
       
  @@ -2020,7 +2081,7 @@
                   echo "$opt_E"
               fi
               eval $opt_E
  -            [ $? -ne 0 ] && exit $?
  +            [ $? -ne 0 ] && shtool_exit $?
           fi
       done
       ;;
  @@ -2028,7 +2089,7 @@
   tarball )
       ##
       ##  tarball -- Roll distribution tarballs
  -    ##  Copyright (c) 1999-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1999-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for shtool
       ##
       
  @@ -2145,7 +2206,7 @@
           if [ ".$opt_t" = .yes ]; then
               echo "mkdir $tmpdir/$tarname" 1>&2
           fi
  -        mkdir $tmpdir/$tarname || exit 1
  +        mkdir $tmpdir/$tarname || shtool_exit 1
           if [ ".$opt_t" = .yes ]; then
               echo "cat $tmpfile.lst | xargs $prg_tar cf - | (cd $tmpdir/$tarname && 
$prg_tar xf -)" 1>&2
           fi
  @@ -2191,7 +2252,7 @@
   subst )
       ##
       ##  subst -- Apply sed(1) substitution operations
  -    ##  Copyright (c) 2001-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 2001-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for OpenPKG's rpmtool
       ##
       
  @@ -2201,11 +2262,11 @@
       #   parameter consistency check
       if [ $# -eq 0 -a ".$opt_b" != . ]; then
           echo "$msgprefix:Error: option -b cannot be applied to stdin" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       if [ $# -eq 0 -a ".$opt_s" = .yes ]; then
           echo "$msgprefix:Error: option -s cannot be applied to stdin" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   build underlying sed(1) command
  @@ -2219,12 +2280,12 @@
       elif [ ".$opt_f" != . ]; then
           if [ ! -f $opt_f ]; then
               echo "$msgprefix:Error: command file \`$opt_f' not found or not a 
regular file" 1>&2
  -            exit 1
  +            shtool_exit 1
           fi
           sedcmd="$sedcmd -f '$opt_f'"
       else
           echo "$msgprefix:Error: either -e option(s) or -f option required" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   determine extension for original file
  @@ -2251,7 +2312,7 @@
                       rm -f $file.new
                       skip=yes
                   else
  -                    (diff -u1 $file $file.new >$tmpfile) 2>/dev/null
  +                    (diff -U1 $file $file.new >$tmpfile) 2>/dev/null
                       if [ ".`cat $tmpfile`" = . ]; then
                           (diff -C1 $file $file.new >$tmpfile) 2>/dev/null
                           if [ ".`cat $tmpfile`" = . ]; then
  @@ -2341,31 +2402,31 @@
       if [ "x$XREL" != "x" ]; then
           if [ -f /etc/kconfig ]; then
               case "$XREL" in
  -                4.0|4.1) echo "${MACHINE}-whatever-isc4"; exit 0 ;;
  +                4.0|4.1) echo "${MACHINE}-whatever-isc4"; shtool_exit 0 ;;
               esac
           else
           case "$XREL" in
               3.2v4.2)
  -                echo "whatever-whatever-sco3"; exit 0
  +                echo "whatever-whatever-sco3"; shtool_exit 0
                   ;;
               3.2v5.0*)
  -                echo "whatever-whatever-sco5"; exit 0
  +                echo "whatever-whatever-sco5"; shtool_exit 0
                   ;;
               4.2MP)
                   if [ "x$VERSION" = "x2.1.1" ]; then
  -                    echo "${MACHINE}-whatever-unixware211"; exit 0
  +                    echo "${MACHINE}-whatever-unixware211"; shtool_exit 0
                   elif [ "x$VERSION" = "x2.1.2" ]; then
  -                    echo "${MACHINE}-whatever-unixware212"; exit 0
  +                    echo "${MACHINE}-whatever-unixware212"; shtool_exit 0
                   else
  -                    echo "${MACHINE}-whatever-unixware2"; exit 0
  +                    echo "${MACHINE}-whatever-unixware2"; shtool_exit 0
                   fi
                   ;;
               4.2)
  -                echo "whatever-whatever-unixware1"; exit 0
  +                echo "whatever-whatever-unixware1"; shtool_exit 0
                   ;;
               5)
                   case "$VERSION" in
  -                    7*) echo "${MACHINE}-whatever-unixware7"; exit 0 ;;
  +                    7*) echo "${MACHINE}-whatever-unixware7"; shtool_exit 0 ;;
                   esac
                   ;;
           esac
  @@ -2373,35 +2434,35 @@
       fi
       case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
           MiNT:*)
  -            echo "m68k-atari-mint"; exit 0
  +            echo "m68k-atari-mint"; shtool_exit 0
               ;;
           A/UX:*)
  -            echo "m68k-apple-aux3"; exit 0
  +            echo "m68k-apple-aux3"; shtool_exit 0
               ;;
           AIX:*)
               MACH=`echo $MACHINE | sed -e 
's;[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F];;'`
  -            echo "${MACH}-ibm-aix${VERSION}.${RELEASE}"; exit 0
  +            echo "${MACH}-ibm-aix${VERSION}.${RELEASE}"; shtool_exit 0
               ;;
           dgux:*)
  -            echo "${MACHINE}-dg-dgux"; exit 0
  +            echo "${MACHINE}-dg-dgux"; shtool_exit 0
               ;;
           HI-UX:*)
  -            echo "${MACHINE}-hi-hiux"; exit 0
  +            echo "${MACHINE}-hi-hiux"; shtool_exit 0
               ;;
           HP-UX:*)
               HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'`
               MACHINE=`echo ${MACHINE}|sed -e 's:/:_:'`
  -            echo "${MACHINE}-hp-hpux${HPUXVER}"; exit 0
  +            echo "${MACHINE}-hp-hpux${HPUXVER}"; shtool_exit 0
               ;;
           IRIX:*)
               if [ -f /usr/lib32/mips4/libm.so ]; then
  -                echo "${MACHINE}/32-sgi-irix${RELEASE}"; exit 0
  +                echo "${MACHINE}/32-sgi-irix${RELEASE}"; shtool_exit 0
               else
  -                echo "${MACHINE}-sgi-irix${RELEASE}"; exit 0
  +                echo "${MACHINE}-sgi-irix${RELEASE}"; shtool_exit 0
               fi
               ;;
           IRIX64:*)
  -            echo "${MACHINE}/64-sgi-irix${RELEASE}"; exit 0
  +            echo "${MACHINE}/64-sgi-irix${RELEASE}"; shtool_exit 0
               ;;
           Linux:*)
               V='whatever'
  @@ -2412,19 +2473,19 @@
               case "$RELEASE" in
                   [1-9].*) R=`echo $RELEASE | cut -c1` ;;
               esac
  -            echo "${MACHINE}-${V}-linux-gnu${R}"; exit 0
  +            echo "${MACHINE}-${V}-linux-gnu${R}"; shtool_exit 0
               ;;
           LynxOS:*)
  -            echo "${MACHINE}-lynx-lynxos"; exit 0
  +            echo "${MACHINE}-lynx-lynxos"; shtool_exit 0
               ;;
           BSD/386|BSD/OS:3.*)
  -            echo "${MACHINE}-whatever-bsdi3"; exit 0
  +            echo "${MACHINE}-whatever-bsdi3"; shtool_exit 0
               ;;
           BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*)
  -            echo "i486-whatever-bsdi"; exit 0
  +            echo "i486-whatever-bsdi"; shtool_exit 0
               ;;
           BSD/386:*|BSD/OS:*)
  -            echo "${MACHINE}-whatever-bsdi"; exit 0
  +            echo "${MACHINE}-whatever-bsdi"; shtool_exit 0
               ;;
           FreeBSD:*)
               VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
  @@ -2441,20 +2502,20 @@
               case ${MACH} in
                  i[0-9]86 ) ARCH="pc" ;;
               esac
  -            echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
  +            echo "${MACH}-${ARCH}-freebsd${VERS}"; shtool_exit 0
               ;;
           NetBSD:*:*:*486*)
  -            echo "i486-whatever-netbsd${RELEASE}"; exit 0
  +            echo "i486-whatever-netbsd${RELEASE}"; shtool_exit 0
               ;;
           NetBSD:*)
  -            echo "${MACHINE}-whatever-netbsd${RELEASE}"; exit 0
  +            echo "${MACHINE}-whatever-netbsd${RELEASE}"; shtool_exit 0
               ;;
           OpenBSD:*)
  -            echo "${MACHINE}-whatever-openbsd"; exit 0
  +            echo "${MACHINE}-whatever-openbsd"; shtool_exit 0
               ;;
           OSF1:*:*:*alpha*)
               VERS=`echo $RELEASE | sed -e 's;^V;;'`
  -            echo "${MACHINE}-dec-osf${VERS}"; exit 0
  +            echo "${MACHINE}-dec-osf${VERS}"; shtool_exit 0
               ;;
           QNX:*)
               if [ "$VERSION" -gt 422 ]; then
  @@ -2462,95 +2523,95 @@
               else
                   echo "${MACHINE}-qssl-qnx"
               fi
  -            exit 0
  +            shtool_exit 0
               ;;
           Paragon*:*:*:*)
  -            echo "i860-intel-osf1"; exit 0
  +            echo "i860-intel-osf1"; shtool_exit 0
               ;;
           SunOS:5.*)
               VERSION=`echo $RELEASE | sed -e 's;^5\.;;'`
  -            echo "${MACHINE}-sun-solaris2.${VERSION}"; exit 0
  +            echo "${MACHINE}-sun-solaris2.${VERSION}"; shtool_exit 0
               ;;
           SunOS:*)
  -            echo "${MACHINE}-sun-sunos4"; exit 0
  +            echo "${MACHINE}-sun-sunos4"; shtool_exit 0
               ;;
           UNIX_System_V:4.*:*)
  -            echo "${MACHINE}-whatever-sysv4"; exit 0
  +            echo "${MACHINE}-whatever-sysv4"; shtool_exit 0
               ;;
           unix:3.0.9*:*:88k)
  -            echo "${MACHINE}-encore-sysv4"; exit 0
  +            echo "${MACHINE}-encore-sysv4"; shtool_exit 0
               ;;
           *:4*:R4*:m88k)
  -            echo "${MACHINE}-whatever-sysv4"; exit 0
  +            echo "${MACHINE}-whatever-sysv4"; shtool_exit 0
               ;;
           UnixWare:5:99*:*)
               # Gemini, beta release of next rev of unixware
  -            echo "${MACHINE}-whatever-unixware212"; exit 0
  +            echo "${MACHINE}-whatever-unixware212"; shtool_exit 0
               ;;
           DYNIX/ptx:4*:*)
  -            echo "${MACHINE}-whatever-sysv4"; exit 0
  +            echo "${MACHINE}-whatever-sysv4"; shtool_exit 0
               ;;
           *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*)
  -            echo "x86-ncr-sysv4"; exit 0
  +            echo "x86-ncr-sysv4"; shtool_exit 0
               ;;
           ULTRIX:*)
  -            echo "${MACHINE}-unknown-ultrix"; exit 0
  +            echo "${MACHINE}-unknown-ultrix"; shtool_exit 0
               ;;
           SINIX-?:* | ReliantUNIX-?:*)
  -            echo "${MACHINE}-siemens-sysv4"; exit 0
  +            echo "${MACHINE}-siemens-sysv4"; shtool_exit 0
               ;;
           POSIX*BS2000)
  -            echo "${MACHINE}-siemens-sysv4"; exit 0
  +            echo "${MACHINE}-siemens-sysv4"; shtool_exit 0
               ;;
           machten:*)
  -           echo "${MACHINE}-tenon-${SYSTEM}"; exit 0;
  +           echo "${MACHINE}-tenon-${SYSTEM}"; shtool_exit 0;
              ;;
           ConvexOS:*:11.*:*)
  -           echo "${MACHINE}-v11-${SYSTEM}"; exit 0;
  +           echo "${MACHINE}-v11-${SYSTEM}"; shtool_exit 0;
              ;;
           UNIX_SV:*:*:maxion)
  -           echo "${MACHINE}-ccur-sysv4"; exit 0;
  +           echo "${MACHINE}-ccur-sysv4"; shtool_exit 0;
              ;;
           PowerMAX_OS:*:*:Night_Hawk)
              MACHINE=`uname -p`
  -           echo "${MACHINE}-concurrent-powermax"; exit 0;
  +           echo "${MACHINE}-concurrent-powermax"; shtool_exit 0;
              ;;
           UNIX_SV:*)
              if [ -d /usr/nec ];then
  -               echo "mips-nec-sysv4"; exit 0;
  +               echo "mips-nec-sysv4"; shtool_exit 0;
              fi
              ;;
           NonStop-UX:4.[02]*:[BC]*:*)
  -           echo "${MACHINE}-tandem-sysv4"; exit 0;
  +           echo "${MACHINE}-tandem-sysv4"; shtool_exit 0;
              ;;
           Rhapsody:*:*:*)
              case "${MACHINE}" in
                  "Power Macintosh") MACHINE=powerpc ;;
              esac
  -           echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0
  +           echo "${MACHINE}-apple-rhapsody${RELEASE}"; shtool_exit 0
              ;;
           Darwin:*:*:*)
              MACHINE=`uname -p`
  -           echo "${MACHINE}-apple-darwin${RELEASE}"; exit 0
  +           echo "${MACHINE}-apple-darwin${RELEASE}"; shtool_exit 0
              ;;
           "Mac OS":*:*:*)
              MACHINE=`uname -p`
  -           echo "${MACHINE}-apple-macos${RELEASE}"; exit 0
  +           echo "${MACHINE}-apple-macos${RELEASE}"; shtool_exit 0
              ;;
           "RISC iX":*)
  -           echo "arm-whatever-riscix"; exit 0;
  +           echo "arm-whatever-riscix"; shtool_exit 0;
              ;;
           *:4.0:2:*)
  -           echo "whatever-unisys-sysv4"; exit 0;
  +           echo "whatever-unisys-sysv4"; shtool_exit 0;
              ;;
           *:*:dcosx:NILE*)
  -           echo "pyramid-pyramid-svr4"; exit 0;
  +           echo "pyramid-pyramid-svr4"; shtool_exit 0;
              ;;
           *:*:*:"DRS 6000")
  -           echo "drs6000-whatever-whatever"; exit 0;
  +           echo "drs6000-whatever-whatever"; shtool_exit 0;
              ;;
           AmigaOS:*:*:* )
  -           echo "${MACHINE}-whatever-${SYSTEM}${RELEASE}"; exit 0
  +           echo "${MACHINE}-whatever-${SYSTEM}${RELEASE}"; shtool_exit 0
              ;;
       esac
       
  @@ -2567,7 +2628,7 @@
                fi
                NEXTREL="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`"
                NEXTARCH=`arch`
  -             echo "${NEXTARCH}-next-${NEXTOS}${NEXTREL}" ; exit 0
  +             echo "${NEXTARCH}-next-${NEXTOS}${NEXTREL}" ; shtool_exit 0
                ;;
       esac
       
  @@ -2578,7 +2639,7 @@
   arx )
       ##
       ##  arx -- Extended archive command
  -    ##  Copyright (c) 1999-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1999-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for shtool
       ##
       
  @@ -2594,7 +2655,7 @@
           for file in $files; do
               if [ ! -f $file ]; then
                   echo "$msgprefix:Error: input file not found: $file" 1>&2
  -                exit 1
  +                shtool_exit 1
               fi
               case $file in
                   *.a )
  @@ -2620,7 +2681,7 @@
                       (cd $tmpdir && eval $ar_prg x $from)
                       if [ $? -ne 0 ]; then
                           echo "$msgprefix:Error: member extraction failed for 
archive: $file" 1>&2
  -                        exit 1
  +                        shtool_exit 1
                       fi
                       for member in - `eval $ar_prg t $file | sed -e '/_\.SYMDEF/d'`; 
do
                           [ ".$member" = .- ] && continue
  @@ -2641,7 +2702,7 @@
       eval $ar_prg $ar_cmd $archive $nfiles
       if [ $? -ne 0 ]; then
           echo "$msgprefix:Error: archive command failed" 1>&2
  -        exit $?
  +        shtool_exit $?
       fi
       
       #   cleanup and die gracefully
  @@ -2656,7 +2717,7 @@
   slo )
       ##
       ##  slo -- Separate linker options by library class
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for Apache
       ##
       
  @@ -2812,7 +2873,7 @@
   scpp )
       ##
       ##  scpp -- Sharing C Pre-Processor
  -    ##  Copyright (c) 1999-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1999-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for GNU Pth
       ##
       
  @@ -2838,7 +2899,7 @@
       done
       if [ ".$awk" = . ]; then
           echo "$msgprefix:Error: cannot find a reasonable Awk" 1>&2
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   parse source file(s)
  @@ -2856,11 +2917,11 @@
               do
                   inputcmd="$inputcmd -e '$e'"
               done
  -            inputcmd="$inputcmd $src"
  +            inputcmd="$inputcmd '$src'"
           else
  -            inputcmd="cat $src"
  +            inputcmd="cat '$src'"
           fi
  -        $inputcmd |\
  +        eval $inputcmd |\
           $awk '
              BEGIN {
                  ln    = 0;
  @@ -3031,7 +3092,7 @@
   version )
       ##
       ##  version -- Maintain a version information file
  -    ##  Copyright (c) 1994-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1994-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for ePerl, rewritten from scratch for shtool
       ##
       
  @@ -3047,7 +3108,7 @@
           #   use given triple
           if [ ".`echo $triple | grep '[0-9]*.[0-9]*[sabp.][0-9]*'`" = . ]; then
               echo "$msgprefix:Error: invalid argument to option \`-s': \`$opt_s'" 
1>&2
  -            exit 1
  +            shtool_exit 1
           fi
           eval `echo $triple |\
                 sed -e 's%\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\).*%\
  @@ -3056,8 +3117,8 @@
       elif [ -r $file ]; then
           #   determine triple from given file
           eval `grep 'Version [0-9]*.[0-9]*[sabp.][0-9]* ([0-9]*-[a-zA-Z]*-[0-9]*)' 
$file |\
  -              head -1 | sed -e 's%.*Version 
\([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) (\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\
  -              ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%'`
  +              sed -e 's%.*Version \([0-9]*\)\.\([0-9]*\)\([sabp.]\)\([0-9]*\) 
(\([0-9]*-[a-zA-Z]*-[0-9]*\)).*%\
  +              ver="\1";rev="\2";typ="\3";lev="\4";tim="\5"%' -e 'q'`
       else
           #   intialise to first version
           ver=0
  @@ -3080,7 +3141,7 @@
               l ) lev=`expr $lev + 1`
                   ;;
               * ) echo "$msgprefix:Error: invalid argument to option \`-i': 
\`$opt_i'" 1>&2
  -                exit 1
  +                shtool_exit 1
                   ;;
           esac
           tim=calc
  @@ -3174,7 +3235,7 @@
                   echo "${hex}"
                   ;;
               * ) echo "$msgprefix:Error: invalid argument to option \`-d': 
\`$opt_d'" 1>&2
  -                exit 1
  +                shtool_exit 1
                   ;;
           esac
       else
  @@ -3300,7 +3361,7 @@
                   echo >>$file ""
                   ;;
               * ) echo "$msgprefix:Error: invalid argument to option \`-l': 
\`$opt_l'" 1>&2
  -                exit 1
  +                shtool_exit 1
                   ;;
           esac
       fi
  @@ -3309,7 +3370,7 @@
   path )
       ##
       ##  path -- Deal with program paths
  -    ##  Copyright (c) 1998-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +    ##  Copyright (c) 1998-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
       ##  Originally written for Apache
       ##
       
  @@ -3341,7 +3402,7 @@
               done
           fi
           echo $rp | sed -e 's:/$::'
  -        exit 0
  +        shtool_exit 0
       fi
       
       #   SPECIAL REQUEST
  @@ -3349,12 +3410,12 @@
       if [ ".$opt_d" = .yes ]; then
           echo "$namelist" |\
           sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'
  -        exit 0
  +        shtool_exit 0
       fi
       if [ ".$opt_b" = .yes ]; then
           echo "$namelist" |\
           sed -e 's;.*/\([^/]*\)$;\1;'
  -        exit 0
  +        shtool_exit 0
       fi
       
       #   MAGIC SITUATION
  @@ -3379,13 +3440,13 @@
               pc=`expr $pc - 1`
           done
           if [ $found = 1 ]; then
  -            perl="`cat $tmpfile | sort -u | tail -1 | cut -d: -f4`"
  +            perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
               rm -f $tmpfile >/dev/null 2>&1
               echo "$perl"
  -            exit 0
  +            shtool_exit 0
           fi
           rm -f $tmpfile >/dev/null 2>&1
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   MAGIC SITUATION
  @@ -3425,9 +3486,9 @@
           rm -f $tmpfile.c $tmpfile.out >/dev/null 2>&1
           if [ ".$cpp" != . ]; then
               echo "$cpp"
  -            exit 0
  +            shtool_exit 0
           fi
  -        exit 1
  +        shtool_exit 1
       fi
       
       #   STANDARD SITUATION
  @@ -3440,15 +3501,14 @@
                   if [ ".$opt_s" != .yes ]; then
                       echo "$path/$name"
                   fi
  -                exit 0
  +                shtool_exit 0
               fi
           done
       done
  -    exit 1
  +    shtool_exit 1
       ;;
   
   esac
   
  -exit 0
  +shtool_exit 0
   
  -##EOF##
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.3263 -r1.3264 news.txt
  --- openpkg-web/news.txt      11 Feb 2003 10:19:59 -0000      1.3263
  +++ openpkg-web/news.txt      11 Feb 2003 13:07:13 -0000      1.3264
  @@ -1,3 +1,4 @@
  +11-Feb-2003: Upgraded package: P<openpkg-20030211-20030211>
   11-Feb-2003: Upgraded package: P<mysql4-4.0.10gamma-20030211>
   11-Feb-2003: Upgraded package: P<xerces-c-2.2.0-20030211>
   11-Feb-2003: Upgraded package: P<perl-xml-20030211-20030211>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to