Index: ossp-pkg/shtool/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v rcsdiff -q -kk '-r1.161' '-r1.162' -u '/v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v' 2>/dev/null --- ChangeLog 2001/09/23 10:27:52 1.161 +++ ChangeLog 2001/09/23 10:58:10 1.162 @@ -11,6 +11,9 @@ Changes between 1.5.4 and 1.6.0 (14-Jun-2001 to xx-Sep-2001): + *) Added GNU long-option support (`--xxxx'). + [Ralf S. Engelschall] + *) Cleaned up temporary file handling in `shtool path'. [Ralf S. Engelschall] Index: ossp-pkg/shtool/sh.arx RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.arx,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.arx,v' 2>/dev/null --- sh.arx 2001/01/17 09:55:11 1.15 +++ sh.arx 2001/09/23 10:58:10 1.16 @@ -20,9 +20,10 @@ ## str_tool="arx" -str_usage="[-t] [-C] [ ...]" +str_usage="[-t|--trace] [-C|--command ] [ ...]" arg_spec="2+" opt_spec="t.C:" +opt_alias="t:trace,C:command" opt_t=no opt_C="ar" Index: ossp-pkg/shtool/sh.common RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.common,v rcsdiff -q -kk '-r1.18' '-r1.19' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.common,v' 2>/dev/null --- sh.common 2001/06/14 19:02:54 1.18 +++ sh.common 2001/09/23 10:58:10 1.19 @@ -45,6 +45,10 @@ eval `echo h.$opt_spec |\ sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'` +# parse option alias string +eval `echo h:help,$opt_alias |\ + tr 'x-' 'x_' | sed -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'` + # interate over argument line opt_PREV='' while [ $# -gt 0 ]; do @@ -65,6 +69,18 @@ else # split argument into option and argument case "$1" in + --[a-zA-Z0-9]*=*) + eval `echo "x$1" |\ + sed -e 's/^x--\([a-zA-Z0-9-]*\)=\(.*\)$/opt_OPT="\1";opt_ARG="\2"/'` + opt_STR=`echo $opt_OPT | tr 'x-' 'x_'` + eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}" + ;; + --[a-zA-Z0-9]*) + opt_OPT=`echo "x$1" | cut -c4-` + opt_STR=`echo $opt_OPT | tr 'x-' 'x_'` + eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}" + opt_ARG='' + ;; -[a-zA-Z0-9]*) eval `echo "x$1" |\ sed -e 's/^x-\([a-zA-Z0-9]\)/opt_OPT="\1";/' \ @@ -107,14 +123,14 @@ eval "opt_${opt_OPT}=\"\$opt_${opt_OPT}\${ASC_NL}\$opt_ARG\"" ;; * ) - echo "$msgprefix:Error: unknown option: \`-$opt_OPT'" 1>&2 + echo "$msgprefix:Error: unknown option: \`$opt_OPT'" 1>&2 echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2 exit 1 ;; esac done if [ ".$opt_PREV" != . ]; then - echo "$msgprefix:Error: missing argument to option \`-$opt_PREV'" 1>&2 + echo "$msgprefix:Error: missing argument to option \`$opt_PREV'" 1>&2 echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2 exit 1 fi Index: ossp-pkg/shtool/sh.echo RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.echo,v rcsdiff -q -kk '-r1.27' '-r1.28' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.echo,v' 2>/dev/null --- sh.echo 2001/06/14 14:24:16 1.27 +++ sh.echo 2001/09/23 10:58:10 1.28 @@ -20,9 +20,10 @@ ## str_tool="echo" -str_usage="[-n] [-e] [ ...]" +str_usage="[-n|--newline] [-e|--expand] [ ...]" arg_spec="0+" opt_spec="n.e." +opt_alias="n:newline,e:expand" opt_n=no opt_e=no Index: ossp-pkg/shtool/sh.fixperm RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.fixperm,v rcsdiff -q -kk '-r1.12' '-r1.13' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.fixperm,v' 2>/dev/null --- sh.fixperm 2001/01/17 09:55:11 1.12 +++ sh.fixperm 2001/09/23 10:58:10 1.13 @@ -20,9 +20,10 @@ ## str_tool="fixperm" -str_usage="[-v] [-t] [ ...]" +str_usage="[-v|--verbose] [-t|--trace] [ ...]" arg_spec="1+" opt_spec="v.t." +opt_alias="v:verbose,t:trace" opt_v=no opt_t=no Index: ossp-pkg/shtool/sh.guessos RCS File: /v/ossp/cvs/ossp-pkg/shtool/Attic/sh.guessos,v co -q -kk -p'1.21' '/v/ossp/cvs/ossp-pkg/shtool/Attic/sh.guessos,v' | diff -u /dev/null - -L'ossp-pkg/shtool/sh.guessos' 2>/dev/null --- ossp-pkg/shtool/sh.guessos +++ - 2024-05-10 00:15:08.929255075 +0200 @@ -0,0 +1,253 @@ +## +## guessos -- Simple operating system guesser +## Copyright (c) 1996-1999 The Apache Group, http://www.apache.org/ +## The Apache license applies (see http://www.apache.org/docs/LICENSE) +## Originally written for Apache +## + +str_tool="guessos" +str_usage="" +arg_spec="0=" +opt_spec="" +opt_alias="" + +. ./sh.common + +MACHINE=`(uname -m) 2>/dev/null` || MACHINE=`(uname -p) 2>/dev/null` || MACHINE="unknown" +RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown" + SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown" +VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown" + +XREL=`(uname -X) 2>/dev/null | grep "^Release" | awk '{print $3}'` +if [ "x$XREL" != "x" ]; then + if [ -f /etc/kconfig ]; then + case "$XREL" in + 4.0|4.1) echo "${MACHINE}-whatever-isc4"; exit 0 ;; + esac + else + case "$XREL" in + 3.2v4.2) + echo "whatever-whatever-sco3"; exit 0 + ;; + 3.2v5.0*) + echo "whatever-whatever-sco5"; exit 0 + ;; + 4.2MP) + if [ "x$VERSION" = "x2.1.1" ]; then + echo "${MACHINE}-whatever-unixware211"; exit 0 + elif [ "x$VERSION" = "x2.1.2" ]; then + echo "${MACHINE}-whatever-unixware212"; exit 0 + else + echo "${MACHINE}-whatever-unixware2"; exit 0 + fi + ;; + 4.2) + echo "whatever-whatever-unixware1"; exit 0 + ;; + 5) + case "$VERSION" in + 7*) echo "${MACHINE}-whatever-unixware7"; exit 0 ;; + esac + ;; + esac + fi +fi +case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in + MiNT:*) + echo "m68k-atari-mint"; exit 0 + ;; + A/UX:*) + echo "m68k-apple-aux3"; 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 + ;; + dgux:*) + echo "${MACHINE}-dg-dgux"; exit 0 + ;; + HI-UX:*) + echo "${MACHINE}-hi-hiux"; exit 0 + ;; + HP-UX:*) + HPUXVER=`echo ${RELEASE}|sed -e 's/[^.]*.[0B]*//'` + MACHINE=`echo ${MACHINE}|sed -e 's:/:_:'` + echo "${MACHINE}-hp-hpux${HPUXVER}"; exit 0 + ;; + IRIX:*) + if [ -f /usr/lib32/mips4/libm.so ]; then + echo "${MACHINE}/32-sgi-irix${RELEASE}"; exit 0 + else + echo "${MACHINE}-sgi-irix${RELEASE}"; exit 0 + fi + ;; + IRIX64:*) + echo "${MACHINE}/64-sgi-irix${RELEASE}"; exit 0 + ;; + Linux:*) + V='whatever' + case "$MACHINE" in + i?86) V='pc' ;; + esac + R='' + case "$RELEASE" in + [1-9].*) R=`echo $RELEASE | cut -c1` ;; + esac + echo "${MACHINE}-${V}-linux-gnu${R}"; exit 0 + ;; + LynxOS:*) + echo "${MACHINE}-lynx-lynxos"; exit 0 + ;; + BSD/386|BSD/OS:3.*) + echo "${MACHINE}-whatever-bsdi3"; exit 0 + ;; + BSD/386:*:*:*486*|BSD/OS:*:*:*:*486*) + echo "i486-whatever-bsdi"; exit 0 + ;; + BSD/386:*|BSD/OS:*) + echo "${MACHINE}-whatever-bsdi"; exit 0 + ;; + FreeBSD:*) + VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'` + MACH=`/sbin/sysctl -n hw.model` + ARCH='whatever' + case ${MACH} in + *386* ) MACH="i386" ;; + *486* ) MACH="i486" ;; + Pentium\ II*) MACH="i686" ;; + Pentium* ) MACH="i586" ;; + Alpha* ) MACH="alpha" ;; + * ) MACH="$MACHINE" ;; + esac + case ${MACH} in + i[0-9]86 ) ARCH="pc" ;; + esac + echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0 + ;; + NetBSD:*:*:*486*) + echo "i486-whatever-netbsd${RELEASE}"; exit 0 + ;; + NetBSD:*) + echo "${MACHINE}-whatever-netbsd${RELEASE}"; exit 0 + ;; + OpenBSD:*) + echo "${MACHINE}-whatever-openbsd"; exit 0 + ;; + OSF1:*:*:*alpha*) + VERS=`echo $RELEASE | sed -e 's;^V;;'` + echo "${MACHINE}-dec-osf${VERS}"; exit 0 + ;; + QNX:*) + if [ "$VERSION" -gt 422 ]; then + echo "${MACHINE}-qssl-qnx32" + else + echo "${MACHINE}-qssl-qnx" + fi + exit 0 + ;; + Paragon*:*:*:*) + echo "i860-intel-osf1"; exit 0 + ;; + SunOS:5.*) + VERSION=`echo $RELEASE | sed -e 's;^5\.;;'` + echo "${MACHINE}-sun-solaris2.${VERSION}"; exit 0 + ;; + SunOS:*) + echo "${MACHINE}-sun-sunos4"; exit 0 + ;; + UNIX_System_V:4.*:*) + echo "${MACHINE}-whatever-sysv4"; exit 0 + ;; + unix:3.0.9*:*:88k) + echo "${MACHINE}-encore-sysv4"; exit 0 + ;; + *:4*:R4*:m88k) + echo "${MACHINE}-whatever-sysv4"; exit 0 + ;; + UnixWare:5:99*:*) + # Gemini, beta release of next rev of unixware + echo "${MACHINE}-whatever-unixware212"; exit 0 + ;; + DYNIX/ptx:4*:*) + echo "${MACHINE}-whatever-sysv4"; exit 0 + ;; + *:4.0:3.0:[345][0-9]?? | *:4.0:3.0:3[34]??[/,]* | library:*) + echo "x86-ncr-sysv4"; exit 0 + ;; + ULTRIX:*) + echo "${MACHINE}-unknown-ultrix"; exit 0 + ;; + SINIX-?:* | ReliantUNIX-?:*) + echo "${MACHINE}-siemens-sysv4"; exit 0 + ;; + POSIX*BS2000) + echo "${MACHINE}-siemens-sysv4"; exit 0 + ;; + machten:*) + echo "${MACHINE}-tenon-${SYSTEM}"; exit 0; + ;; + ConvexOS:*:11.*:*) + echo "${MACHINE}-v11-${SYSTEM}"; exit 0; + ;; + UNIX_SV:*:*:maxion) + echo "${MACHINE}-ccur-sysv4"; exit 0; + ;; + PowerMAX_OS:*:*:Night_Hawk) + MACHINE=`uname -p` + echo "${MACHINE}-concurrent-powermax"; exit 0; + ;; + UNIX_SV:*) + if [ -d /usr/nec ];then + echo "mips-nec-sysv4"; exit 0; + fi + ;; + NonStop-UX:4.[02]*:[BC]*:*) + echo "${MACHINE}-tandem-sysv4"; exit 0; + ;; + Rhapsody:*:*:*) + case "${MACHINE}" in + "Power Macintosh") MACHINE=powerpc ;; + esac + echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0 + ;; + "Mac OS":*:*:*) + MACHINE=`uname -p` + echo "${MACHINE}-apple-macos${RELEASE}"; exit 0 + ;; + "RISC iX":*) + echo "arm-whatever-riscix"; exit 0; + ;; + *:4.0:2:*) + echo "whatever-unisys-sysv4"; exit 0; + ;; + *:*:dcosx:NILE*) + echo "pyramid-pyramid-svr4"; exit 0; + ;; + *:*:*:"DRS 6000") + echo "drs6000-whatever-whatever"; exit 0; + ;; + AmigaOS:*:*:* ) + echo "${MACHINE}-whatever-${SYSTEM}${RELEASE}"; exit 0 + ;; +esac + +# Now NeXT +ISNEXT=`(hostinfo) 2>/dev/null` +case "$ISNEXT" in + *NeXT*) + # Swiped from a friendly uname clone for NEXT/OPEN Step. + NEXTOSVER="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`" + if [ "$NEXTOSVER" -gt 3.3 ]; then + NEXTOS="openstep" + else + NEXTOS="nextstep" + fi + NEXTREL="`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`" + NEXTARCH=`arch` + echo "${NEXTARCH}-next-${NEXTOS}${NEXTREL}" ; exit 0 + ;; +esac + +# Fallback +echo "${MACHINE}-unknown-${SYSTEM}/${RELEASE}/${VERSION}" + Index: ossp-pkg/shtool/sh.install RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.install,v rcsdiff -q -kk '-r1.22' '-r1.23' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.install,v' 2>/dev/null --- sh.install 2001/06/14 19:02:54 1.22 +++ sh.install 2001/09/23 10:58:10 1.23 @@ -20,9 +20,10 @@ ## str_tool="install" -str_usage="[-v] [-t] [-c] [-C] [-s] [-m] [-o] [-g] [-e] [ ...] " +str_usage="[-v|--verbose] [-t|--trace] [-c|--copy] [-C|--compare-copy] [-s|--strip] [-m|--mode ] [-o|--owner ] [-g|--group ] [-e|--exec ] [ ...] " 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" opt_v=no opt_t=no opt_c=no Index: ossp-pkg/shtool/sh.mdate RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.mdate,v co -q -kk -p'1.11' '/v/ossp/cvs/ossp-pkg/shtool/sh.mdate,v' | diff -u /dev/null - -L'ossp-pkg/shtool/sh.mdate' 2>/dev/null --- ossp-pkg/shtool/sh.mdate +++ - 2024-05-10 00:15:08.936342638 +0200 @@ -0,0 +1,152 @@ +## +## mdate -- Pretty-print modification time of a file or dir +## Copyright (c) 1995-1997 Free Software Foundation, Inc. +## Originally idea and basis code by Ulrich Drepper +## Enhanced by Ralf S. Engelschall for shtool +## +## This file is part of shtool and free software; you can redistribute +## it and/or modify it under the terms of the GNU General Public +## License as published by the Free Software Foundation; either version +## 2 of the License, or (at your option) any later version. +## +## This file is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## USA, or contact Ralf S. Engelschall . +## + +str_tool="mdate" +str_usage="[-n|--newline] [-z|--zero] [-s|--shorten] [-d|--digits] [-f|--field-sep ] [-o|--order ] " +arg_spec="1=" +opt_spec="n.z.s.d.f:o:" +opt_alias="n:newline,z:zero,s:shorten,d:digits,f:field-sep,o:order" +opt_n=no +opt_z=no +opt_s=no +opt_d=no +opt_f=" " +opt_o="dmy" + +. ./sh.common + +fod="$1" +case "$opt_o" in + [dmy][dmy][dmy] ) + ;; + * ) echo "$msgprefix:Error: invalid argument to option \`-o': $opt_o" 1>&2 + exit 1 + ;; +esac +if [ ! -r "$fod" ]; then + echo "$msgprefix:Error: file or directory not found: $fod" 1>&2 + exit 1 +fi + +# prevent "date" giving response in another language +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_TIME=C; export LC_TIME + +# get the extended ls output of the file or directory. +if ls -L /dev/null >/dev/null 2>&1; then + set - x`ls -L -l -d $fod` +else + set - x`ls -l -d $fod` +fi + +# The month is at least the fourth argument +# (3 shifts here, the next inside the loop). +shift; shift; shift + +# Find the month. Next argument is day, followed by the year or time. +month="" +while [ ".$month" = . ]; do + shift + case $1 in + Jan) month=January; nummonth=1 ;; + Feb) month=February; nummonth=2 ;; + Mar) month=March; nummonth=3 ;; + Apr) month=April; nummonth=4 ;; + May) month=May; nummonth=5 ;; + Jun) month=June; nummonth=6 ;; + Jul) month=July; nummonth=7 ;; + Aug) month=August; nummonth=8 ;; + Sep) month=September; nummonth=9 ;; + Oct) month=October; nummonth=10 ;; + Nov) month=November; nummonth=11 ;; + Dec) month=December; nummonth=12 ;; + esac +done +day="$2" +year="$3" + +# We finally have to deal with the problem that the "ls" output +# gives either the time of the day or the year. +case $year in + *:*) + this_year=`date '+%Y' 2>/dev/null` + if [ ".$this_year" = . ]; then + this_year=`date '+%y'` + case $this_year in + [5-9][0-9]) this_year="19$this_year" ;; + [0-4][0-9]) this_year="20$this_year" ;; + esac + fi + # for the following months of the last year the time notation + # is usually also used for files modified in the last year. + this_month=`date '+%m'` + if (expr $nummonth \> $this_month) >/dev/null; then + this_year=`expr $this_year - 1` + fi + year="$this_year" + ;; +esac + +# Optionally fill day and month with leeding zeros +if [ ".$opt_z" = .yes ]; then + case $day in + [0-9][0-9] ) ;; + [0-9] ) day="0$day" ;; + esac + case $nummonth in + [0-9][0-9] ) ;; + [0-9] ) nummonth="0$nummonth" ;; + esac +fi + +# Optionally use digits for month +if [ ".$opt_d" = .yes ]; then + month="$nummonth" +fi + +# Optionally shorten the month name to three characters +if [ ".$opt_s" = .yes ]; then + month=`echo $month | cut -c1-3` +fi + +# Output the resulting date string +echo dummy | awk '{ + for (i = 0; i < 3; i++) { + now = substr(order, 1, 1); + order = substr(order, 2); + if (now == "d") + out = day; + else if (now == "m") + out = month; + else if (now == "y") + out = year; + if (i < 2) + printf("%s%s", out, field); + else + printf("%s", out); + } + if (newline != "yes") + printf("\n"); +}' "day=$day" "month=$month" "year=$year" \ + "field=$opt_f" "order=$opt_o" "newline=$opt_n" + Index: ossp-pkg/shtool/sh.mkdir RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.mkdir,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.mkdir,v' 2>/dev/null --- sh.mkdir 2001/04/19 07:52:02 1.16 +++ sh.mkdir 2001/09/23 10:58:10 1.17 @@ -21,9 +21,10 @@ ## str_tool="mkdir" -str_usage="[-t] [-f] [-p] [-m] [ ...]" +str_usage="[-t|--trace] [-f|--force] [-p|--parents] [-m|--mode ] [ ...]" arg_spec="1+" opt_spec="t.f.p.m:" +opt_alias="t:trace,f:force,p:parents,m:mode" opt_t=no opt_f=no opt_p=no Index: ossp-pkg/shtool/sh.mkln RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.mkln,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.mkln,v' 2>/dev/null --- sh.mkln 2001/01/17 09:55:11 1.10 +++ sh.mkln 2001/09/23 10:58:10 1.11 @@ -20,9 +20,10 @@ ## str_tool="mkln" -str_usage="[-t] [-f] [-s] [ ...] " +str_usage="[-t|--trace] [-f|--force] [-s|--symbolic] [ ...] " arg_spec="2+" opt_spec="t.f.s." +opt_alias="t:trace,f:force,s:symbolic" opt_t=no opt_f=no opt_s=no Index: ossp-pkg/shtool/sh.mkshadow RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.mkshadow,v rcsdiff -q -kk '-r1.18' '-r1.19' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.mkshadow,v' 2>/dev/null --- sh.mkshadow 2001/01/17 09:55:11 1.18 +++ sh.mkshadow 2001/09/23 10:58:10 1.19 @@ -20,9 +20,10 @@ ## str_tool="mkshadow" -str_usage="[-v] [-t] [-a] " +str_usage="[-v|--verbose] [-t|--trace] [-a|--all] " arg_spec="2=" opt_spec="v.t.a." +opt_alias="v:verbose,t:trace,a:all" opt_v=no opt_t=no opt_a=no Index: ossp-pkg/shtool/sh.move RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.move,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.move,v' 2>/dev/null --- sh.move 2001/01/17 09:55:11 1.13 +++ sh.move 2001/09/23 10:58:10 1.14 @@ -20,9 +20,10 @@ ## str_tool="move" -str_usage="[-v] [-t] [-e] [-p] " +str_usage="[-v|--verbose] [-t|--trace] [-e|--expand] [-p|--preserve] " arg_spec="2=" opt_spec="v.t.e.p." +opt_alias="v:verbose,t:trace,e:expand,p:preserve" opt_v=no opt_t=no opt_e=no Index: ossp-pkg/shtool/sh.path RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.path,v rcsdiff -q -kk '-r1.19' '-r1.20' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.path,v' 2>/dev/null --- sh.path 2001/08/04 15:43:22 1.19 +++ sh.path 2001/09/23 10:58:10 1.20 @@ -20,10 +20,11 @@ ## str_tool="path" -str_usage="[-s] [-r] [-d] [-b] [-m] [-p] [ ...]" +str_usage="[-s|--suppress] [-r|--reverse] [-d|--dirname] [-b|--basename] [-m|--magic] [-p|--path ] [ ...]" gen_tmpfile=yes arg_spec="1+" opt_spec="s.r.d.b.m.p:" +opt_alias="s:suppress,r:reverse,d:dirname,b:basename,m:magic,p:path" opt_s=no opt_r=no opt_d=no Index: ossp-pkg/shtool/sh.prop RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.prop,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.prop,v' 2>/dev/null --- sh.prop 2001/01/17 09:55:11 1.13 +++ sh.prop 2001/09/23 10:58:10 1.14 @@ -20,9 +20,10 @@ ## str_tool="prop" -str_usage="[-p]" +str_usage="[-p|--prefix ]" arg_spec="0=" opt_spec="p:" +opt_alias="p:prefix" opt_p="" . ./sh.common Index: ossp-pkg/shtool/sh.scpp RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.scpp,v rcsdiff -q -kk '-r1.19' '-r1.20' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.scpp,v' 2>/dev/null --- sh.scpp 2001/06/14 19:02:54 1.19 +++ sh.scpp 2001/09/23 10:58:10 1.20 @@ -20,10 +20,11 @@ ## str_tool="scpp" -str_usage="[-v] [-p] [-f] [-o] [-t] [-M] [-D] [-C] [ ...]" +str_usage="[-v|--verbose] [-p|--preserve] [-f|--filter ] [-o|--output ] [-t|--template ] [-M|--mark ] [-D|--define ] [-C|--class ] [ ...]" gen_tmpfile=yes arg_spec="1+" opt_spec="v.p.f+o:t:M:D:C:" +opt_alias="v:verbose,p:preserve,f:filter,o:output,t:template,M:mark,D:define,C:class" opt_v=no opt_p=no opt_f="" Index: ossp-pkg/shtool/sh.slo RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.slo,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.slo,v' 2>/dev/null --- sh.slo 2001/01/29 14:06:27 1.16 +++ sh.slo 2001/09/23 10:58:10 1.17 @@ -20,9 +20,10 @@ ## str_tool="slo" -str_usage="[-p] -- -L -l [-L -l ...]" +str_usage="[-p|--prefix ] -- -L -l [-L -l ...]" arg_spec="1+" opt_spec="p:" +opt_alias="p:prefix" opt_p="SLO_" . ./sh.common Index: ossp-pkg/shtool/sh.subst RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.subst,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.subst,v' 2>/dev/null --- sh.subst 2001/06/14 19:02:54 1.1 +++ sh.subst 2001/09/23 10:58:10 1.2 @@ -20,10 +20,11 @@ ## str_tool="subst" -str_usage="[-v] [-t] [-n] [-s] [-i] [-b] [-e] [-f] [] [...]" +str_usage="[-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth] [-i|--interactive] [-b|--backup ] [-e|--exec ] [-f|--file ] [] [...]" gen_tmpfile=yes arg_spec="0+" opt_spec="v.t.n.s.i.b:e+f:" +opt_alias="v:verbose,t:trace,n:nop,s:stealth,i:interactive,b:backup,e:exec,f:file" opt_v=no opt_t=no opt_n=no Index: ossp-pkg/shtool/sh.table RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.table,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.table,v' 2>/dev/null --- sh.table 2001/01/17 09:55:11 1.14 +++ sh.table 2001/09/23 10:58:10 1.15 @@ -20,9 +20,10 @@ ## str_tool="table" -str_usage="[-F] [-w] [-c] [-s] ..." +str_usage="[-F|--field-sep ] [-w|--width ] [-c|--columns ] [-s|--strip ] ..." arg_spec="1+" opt_spec="F:w:c:s:" +opt_alias="F:field-sep,w:width,c:columns,s:strip" opt_F=":" opt_w=15 opt_c=3 Index: ossp-pkg/shtool/sh.tarball RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.tarball,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.tarball,v' 2>/dev/null --- sh.tarball 2001/02/27 15:13:32 1.14 +++ sh.tarball 2001/09/23 10:58:10 1.15 @@ -20,10 +20,11 @@ ## str_tool="tarball" -str_usage="[-t] [-v] [-o] [-c] [-d] [-u] [-g] [-e] [ ...]" +str_usage="[-t|--trace] [-v|--verbose] [-o|--output ] [-c|--compress ] [-d|--directory ] [-u|--user ] [-g|--group ] [-e|--exclude ] [ ...]" gen_tmpfile=yes arg_spec="1+" opt_spec="t.v.o:c:d:u:g:e:" +opt_alias="t:trace,v:verbose,o:output,c:compress,d:directory,u:user,g:group,e:exclude" opt_t=no opt_v=no opt_o="" Index: ossp-pkg/shtool/sh.version RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.version,v rcsdiff -q -kk '-r1.29' '-r1.30' -u '/v/ossp/cvs/ossp-pkg/shtool/sh.version,v' 2>/dev/null --- sh.version 2001/06/14 14:24:16 1.29 +++ sh.version 2001/09/23 10:58:10 1.30 @@ -20,9 +20,10 @@ ## str_tool="version" -str_usage="[-l] [-n] [-p] [-s] [-e] [-i] [-d] " +str_usage="[-l|--language ] [-n|--name ] [-p|--prefix ] [-s|--set ] [-e|--edit] [-i|--increase ] [-d|--display ] " arg_spec="1=" opt_spec="l:n:p:s:i:e.d:" +opt_alias="l:language,n:name,p:prefix,s:set,e:edit,i:increase,d:display" opt_l="txt" opt_n="unknown" opt_p="" Index: ossp-pkg/shtool/shtool.pod RCS File: /v/ossp/cvs/ossp-pkg/shtool/shtool.pod,v rcsdiff -q -kk '-r1.54' '-r1.55' -u '/v/ossp/cvs/ossp-pkg/shtool/shtool.pod,v' 2>/dev/null --- shtool.pod 2001/06/14 19:30:39 1.54 +++ shtool.pod 2001/09/23 10:58:10 1.55 @@ -290,7 +290,7 @@ =over 4 -=item B [B<-n>] [B<-e>] I +=item B [B<-n>|B<--newline>] [B<-e>|B<--expand>] I This is an echo(1) style print command which provides special expansion constructs (terminal bold mode, environment details, date) and newline @@ -320,7 +320,7 @@ shtool echo -e "Your Email address might be %u@%h%d" shtool echo -e "The current date is %D-%m-%Y" -=item B [B<-n>] [B<-z>] [B<-s>] [B<-d>] [B<-f> I] [B<-o> I] I +=item B [B<-n>|B<--newline>] [B<-z>|B<--zero>] [B<-s>|B<--shorten>] [B<-d>|B<--digits>] [B<-f>|B<--field-sep> I] [B<-o>|B<--order> I] I This command pretty-prints the last modification time of a file or directory I. Option ``B<-n>'' suppresses the output of a trailing newline @@ -346,7 +346,7 @@ shtool mdate -f '/' -z -d -o ymd foo.txt shtool mdate -f '-' -s foo.txt -=item B [B<-F> I] [B<-w> I] [B<-c> I] [B<-s> I] IBI... +=item B
[B<-F>|B<--field-sep> I] [B<-w>|B<--width> I] [B<-c>|B<--columns> I] [B<-s>|B<--strip> I] IBI... This pretty-prints a I-sperarated list of Iings as a table. Per default a colon-separated list (I=":") is pretty printed as a @@ -362,7 +362,7 @@ # shell script shtool table -F , -w 5 -c 4 "1,2,3,4,5,6,7,8,9,10,11,12" -=item B [B<-p> I] +=item B [B<-p>|B<--prefix> I] This command displays a processing indication though a running propeller. The option ``B<-p>'' can be used to set a particular prefix I which is @@ -382,7 +382,7 @@ tee logfile |\ shtool prop -p "Configuring sources" -=item B [-v] [-t] [-e] [-p] I I +=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-e>|B<--expand>] [B<-p>|B<--preserve>] I I This is a mv(1) style command, but with two special features: First if option ``B<-e>'' (`expand') is used and an asterisk occurs somewhere in I @@ -409,7 +409,7 @@ lex scanner.l shtool move -t -p lex.yy.c scanner.c -=item B [B<-v>] [B<-t>] [B<-c>] [B<-C>] [B<-s>] [B<-m> I] [B<-o> I] [B<-g> I] [B<-e> I] I I +=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-c>|B<--copy>] [B<-C>|B<--compare-copy>] [B<-s>|B<--strip>] [B<-m>|B<--mode> I] [B<-o>|B<--owner> I] [B<-g>|B<--group> I] [B<-e>|B<--exec> I] I I This command installs a program, script or datafile (dependent on I) in a portable way while providing all important options of the BSD install(1) @@ -440,14 +440,15 @@ shtool install -c -m 644 foo.man $(mandir)/man1/foo.1 shtool install -c -m 644 -e "s/@p@/$prefix/g" foo.conf $(etcdir)/ -=item B [B<-t>] [B<-f>] [B<-p>] [B<-m> I] I [I ...] +=item B [B<-t>|B<--trace>] [B<-f>|B<--force>] [B<-p>|B<--parents>] [B<-m>|B<--mode> I] I [I ...] -This is a mkdir(1) style command providing support for auto-parent-dir -creation (if option ``B<-p>'' is used), directory permission control (with -option ``B<-m> I'' where I can be in any of the formats specified -to the chmod(1) command) and smart skipping if I already exists -(triggered by the force option ``B<-f>''). Option ``B<-t>'' (trace) can be -used to enable the output of the essential shell commands which are executed. +This is a mkdir(1) style command providing support for automatic parent +directory creation (if option ``B<-p>'' is used), directory permission +control (with option ``B<-m> I'' where I can be in any of +the formats specified to the chmod(1) command) and smart skipping if +I already exists (triggered by the force option ``B<-f>''). Option +``B<-t>'' (trace) can be used to enable the output of the essential +shell commands which are executed. The trick of this command is that it provides both a portable ``B<-p>'' functionality and the ability to be smart if the directory already exists @@ -461,7 +462,7 @@ shtool mkdir -f -p -m 755 $(mandir)/man1 : -=item B [B<-t>] [B<-f>] [B<-s>] I [I ...] I +=item B [B<-t>|B<--trace>] [B<-f>|B<--force>] [B<-s>|B<--symbolic>] I [I ...] I This is a ln(1) style command which provides automatic calculation and usage of relative links if possible, i.e. usually if I and I @@ -481,7 +482,7 @@ # shell script shtool mkln -s foo/bar baz/quux -=item B [B<-v>] [B<-t>] [B<-a>] I I +=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-a>|B<--all>] I I This command creates a shadow tree of I under I by recreating the directory hierarchy of I under I and by @@ -505,7 +506,7 @@ # shell script shtool mkshadow -v -a . /tmp/shadow -=item B [B<-v>] [B<-t>] I [ I ... ] +=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] I [ I ... ] This command fixes file permissions inside a source tree under I by cleaning up the permission bits. It determines the cleaned up permission from @@ -524,7 +525,7 @@ shtool fixperm -v * ... -=item B [B<-t>] [B<-v>] [B<-o> I] [B<-c> I] [B<-u> I] [B<-g> I] [B<-e> I] I [I ...] +=item B [B<-t>|B<--trace>] [B<-v>|B<--verbose>] [B<-o>|B<--output> I] [B<-c>|B<--compress> I] [B<-u>|B<--user> I] [B<-g>|B<--group> I] [B<-e>|B<--exclude> I] I [I ...] This command is for `rolling' distribution `tarballs', i.e. for the creation of distribution files generated by `C'. The important aspects of @@ -559,7 +560,7 @@ shtool tarball -o foobar-$$V.tar.gz -c 'gzip -9' \ -u bar -g gnu -e 'CVS,\.cvsignore' . -=item B [B<-v>] [B<-t>] [B<-n>] [B<-s>] [B<-i>] [B<-b> I] [B<-e> I] [B<-f> I] [I] [I ...] +=item B [B<-v>|B<--verbose>] [B<-t>|B<--trace>] [B<-n>|B<--nop>] [B<-s>|B<--stealth>] [B<-i>|B<--interactive>] [B<-b>|B<--backup> I] [B<-e>|B<--exec> I] [B<-f>|B<--file> I] [I] [I ...] This command applies one or more sed(1) substitution operations to F or any number of files. The sed(1) operations are either @@ -601,7 +602,7 @@ # configure.in OS=`shtool guessos` -=item B [B<-t>] [B<-C> I] I I I [I ...] +=item B [B<-t>|B<--trace>] [B<-C>|B<--command> I] I I I [I ...] This is a wrapper around the archive (``C'') tool. It provides the ability to create archives out of existing archives, i.e. if one of I matches @@ -628,7 +629,7 @@ shtool arx -C $(AR) rc libfoo.a $(OBJS) $(LIBS) $(RANLIB) libfoo.a -=item B [B<-p> I] -- B<-L>I B<-l>I [ B<-L>I B<-l>I ... ] +=item B [B<-p>|B<--prefix> I] -- B<-L>I B<-l>I [ B<-L>I B<-l>I ... ] This command separates the linker options ``B<-L>'' and ``B<-l>'' by library class. It's argument line can actually be an abitrary command line where those @@ -660,7 +661,7 @@ LINK_DSO="$SLO_DIRS_OBJ $SLO_LIBS_OBJ $SLO_DIRS_PIC $SLO_LIBS_PIC" : -=item B [B<-v>] [B<-p>] [B<-f>] I] [B<-o> I] [B<-t> I] [B<-M> I] [B<-D> I] [B<-C> I] I [I ...] +=item B [B<-v>|B<--verbose>] [B<-p>|B<--preserve>] [B<-f>|B<--filter> I] [B<-o>|B<--output> I] [B<-t>|B<--template> I] [B<-M>|B<--mark> I] [B<-D>|B<--define> I] [B<-C>|B<--class> I] I [I ...] This command is an additional ANSI C source file pre-processor for sharing cpp(1) code segments, internal variables and internal functions. The intention @@ -741,7 +742,7 @@ return 0; } -=item B [B<-l> I] [B<-n> I] [B<-p> I] [B<-s> I] [B<-e>] [B<-i> I] [B<-d> I] I +=item B [B<-l>|B<--language> I] [B<-n>|B<--name> I] [B<-p>|B<--prefix> I] [B<-s>|B<--set> I] [B<-e>|B<--edit>] [B<-i>|B<--increase> I] [B<-d>|B<--display> I] I This command generates and maintains a version information file I for program name I in either textual @@ -780,7 +781,7 @@ V=`shtool version -l c -d long version.c` echo "Configuring FooBar, Version $V" -=item B [B<-s>] [B<-r>] [B<-d>] [B<-b>] [B<-m>] [-p I] I [I ...] +=item B [B<-s>|B<--suppress>] [B<-r>|B<--reverse>] [B<-d>|B<--dirname>] [B<-b>|B<--basename>] [B<-m>|B<--magic>] [B<-p>|B<--path> I] I [I ...] This command deals with shell C<$PATH> variables. It can find a program executable in $PATH or I through one or more filenames (given by one or @@ -812,15 +813,16 @@ =head1 HISTORY -Some scripts contained in B were already written in 1994 by I for use inside some private source trees. Then they evolved -into more elaborated versions over the years and were used in various free -software projects like ePerl, WML, iSelect, gFONT, etc. They were complemented -with other scripts from the author which he wrote in March 1998 for the -``Apache Autoconf-style Interface'' (APACI). In April 1999 the B -package was created out of the accumulated master versions of the scripts and -in June 1999 it entered the status of an official GNU program and this way -finally joined the group of B, B and B. +Some scripts contained in GNU B were already written in 1994 by +I for use inside some private source trees. Then +they evolved into more elaborated versions over the years and were used +in various free software projects like ePerl, WML, iSelect, gFONT, etc. +They were complemented with other scripts from the author which he wrote +in March 1998 for the ``Apache Autoconf-style Interface'' (APACI) for +Apache 1.3. In April 1999 the B package was created out of the +accumulated master versions of the scripts and in June 1999 it entered +the status of an official GNU program and this way finally joined the +group of GNU B, GNU B and GNU B. =head1 AUTHOR Index: ossp-pkg/shtool/shtoolize.in RCS File: /v/ossp/cvs/ossp-pkg/shtool/shtoolize.in,v rcsdiff -q -kk '-r1.24' '-r1.25' -u '/v/ossp/cvs/ossp-pkg/shtool/shtoolize.in,v' 2>/dev/null --- shtoolize.in 2001/06/14 19:02:54 1.24 +++ shtoolize.in 2001/09/23 10:58:10 1.25 @@ -255,15 +255,20 @@ my $u = $SCRIPT->{$name}->{USAGE}; my $u2 = ''; my $u3 = ''; + my $u4 = ''; if ($u =~ m|^(.{50}.*?)\s+(.+)$|) { ($u, $u2) = ($1, $2); } if ($u2 =~ m|^(.{50}.*?)\s+(.+)$|) { ($u2, $u3) = ($1, $2); } + if ($u3 =~ m|^(.{50}.*?)\s+(.+)$|) { + ($u3, $u4) = ($1, $2); + } $usage .= sprintf(" echo ' %-8s %s'\n", $name, $u); $usage .= sprintf(" echo ' %-8s %s'\n", '', $u2) if ($u2); $usage .= sprintf(" echo ' %-8s %s'\n", '', $u3) if ($u3); + $usage .= sprintf(" echo ' %-8s %s'\n", '', $u4) if ($u4); } if (@unused) { $usage .= " echo ''\n"; @@ -271,11 +276,21 @@ foreach $name (@unused) { my $u = $SCRIPT->{$name}->{USAGE}; my $u2 = ''; + my $u3 = ''; + my $u4 = ''; if ($u =~ m|^(.{50}.*?)\s+(.+)$|) { ($u, $u2) = ($1, $2); } + if ($u2 =~ m|^(.{50}.*?)\s+(.+)$|) { + ($u2, $u3) = ($1, $2); + } + if ($u3 =~ m|^(.{50}.*?)\s+(.+)$|) { + ($u3, $u4) = ($1, $2); + } $usage .= sprintf(" echo ' %-8s %s'\n", $name, $u); $usage .= sprintf(" echo ' %-8s %s'\n", '', $u2) if ($u2); + $usage .= sprintf(" echo ' %-8s %s'\n", '', $u3) if ($u3); + $usage .= sprintf(" echo ' %-8s %s'\n", '', $u4) if ($u4); } } $usage =~ s|\n$||s;