Index: ossp-pkg/shtool/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v co -q -kk -p'1.121' '/v/ossp/cvs/ossp-pkg/shtool/ChangeLog,v' | diff -u /dev/null - -L'ossp-pkg/shtool/ChangeLog' 2>/dev/null --- ossp-pkg/shtool/ChangeLog +++ - 2024-05-14 19:41:10.866513122 +0200 @@ -0,0 +1,480 @@ + _ _ _ + ___| |__ | |_ ___ ___ | | + / __| '_ \| __/ _ \ / _ \| | + \__ \ | | | || (_) | (_) | | + |___/_| |_|\__\___/ \___/|_| + + GNU shtool -- The GNU Portable Shell Tool + ____________________________________________________________________ + + ChangeLog + + Changes between 1.4.9 and 1.4.10 (16-Apr-2000 to xx-Jun-2000): + + *) Fixed `here-document' handling in shtoolize: the whitespaces + were incorrectly determined and so newlines were lost. + [Ralf S. Engelschall] + + *) Allow `shtool install file [file ...] dir', i.e., multiple + source files if target is a directory. This is especially useful + for mass-installing files by using shell wildcards for the source. + [Ralf S. Engelschall] + + *) Be compatible with SUSv2 and let `shtool mkdir -p' not complain + if directory already exists. + [Sascha Schumann ] + + Changes between 1.4.8 and 1.4.9 (12-Mar-2000 to 16-Apr-2000): + + *) Added an `-f ' option to `shtool scpp' which can be used to + pre-filter all input files with one or more sed-expressions . + [Ralf S. Engelschall] + + *) Try also `uname -x' in addition to `uname -m' in `shtool guessos' + for backward compatibility to SVR4 platforms. Additionally changed + the fallback vendor string from `whatever' to `unknown'. + [Ralf S. Engelschall] + + *) Added `-p' option to `shtool slo' to allow + one to change the default variable prefix `SLO_' to . + [Ralf S. Engelschall] + + *) Speeded up `shtool echo -e "..%B..%b.."' by trying tput and tcout + only if terminal is not a vt100, vt200 or an xterm (because for these + three we have the escape sequences hard-coded). + [Ralf S. Engelschall] + + *) Fixed various typos in the scripts. + [Ralf S. Engelschall] + + *) Replaced old and ugly test for `test -x' in sh.fixperm, sh.path + and sh.tarball with a faster, shorter and still sufficient test. + [Ralf S. Engelschall] + + *) Added a RPM spec file shtool.spec which allows one to build RPM + packages directly from the Shtool distribution tarball through a + simple `rpm -tb shtool-1.X.Y.tar.gz' call. + [Daniel Richard G. ] + + Changes between 1.4.7 and 1.4.8 (24-Dec-1999 to 12-Mar-2000): + + *) Greatly speeded up option processing by moving option defaults + directly into the sh.* scripts and by using a few faster parsing + constructs. + [Ralf S. Engelschall] + + *) Fixed a syntax error in the option parsing (there was a trailing + quote character '"' in an 'eval' command). It fortunately and + surprisingly never harmed the operation on any platforms. + Additionally we now use sed instead of awk here. + [Ralf S. Engelschall] + + *) Made shtool's command line related error messages more + clear by distinguishing between options and commands. + [Denis Barbier ] + + *) Updated all copyright messages for year 2000. + [Ralf S. Engelschall] + + Changes between 1.4.6 and 1.4.7 (05-Sep-1999 to 24-Dec-1999): + + *) Replaced the too generic (and this way slowed down processing) + bang `!' mode in option parsing with a per-script local setup. + [Denis Barbier ] + + *) Fixed mkshadow command: it calculated the reverse path incorrectly + if the destination path contained `../' elements. + [Ralf S. Engelschall, Gil ?? ] + + *) Ignore `_.SYMDEF' symbols in arx command. + [Ralf S. Engelschall] + + *) Fixed `shtool echo' command for arguments containing whitespaces. + [Denis Barbier ] + + Changes between 1.4.5 and 1.4.6 (28-Jul-1999 to 05-Sep-1999): + + *) Fixed manual page sections in Makefile.in. + [Denis Barbier ] + + *) Accept `tarcust' in addition to `tardy' in sh.tarball. + [Ralf S. Engelschall] + + *) Added hint to `shtoolize' to INSTALL document. + [Denis Barbier ] + + *) Added support for AmigaOS to sh.guessos + [Ralf S. Engelschall] + + *) Replace bars (`|') by slashes (`/') in sh.guessos' fallback + result string to avoid problems in GNU libtool. + [Kriton Kyrimis ] + + Changes between 1.4.4 and 1.4.5 (17-Jul-1999 to 28-Jul-1999): + + *) Added a shtool.m4 which provides an AC_PROG_SHTOOL macro to GNU + Autoconf. This is installed in $datadir/aclocal/ so it can be picked up + by Autoconf's aclocal command. + [Ralf S. Engelschall] + + *) Added `uninstall' target to Makefile.in + [Ralf S. Engelschall] + + *) Source tree adjustments to comply more to the GNU standards: Added + AUTHORS file; renamed CHANGES to ChangeLog and CREDITS to THANKS. + [Ralf S. Engelschall] + + *) Added `make check' as an alias for `make test' + [Ralf S. Engelschall] + + Changes between 1.4.3 and 1.4.4 (11-Jul-1999 to 17-Jul-1999): + + *) Added a new `shtool tarball' command for rolling + nice distribution tarballs. + [Ralf S. Engelschall] + + *) Fixed usage message of shtoolize. + [Ralf S. Engelschall] + + *) Adjusted IRIX detection in sh.guessos. + [Ralf S. Engelschall] + + *) Allow shtool to recognize symlinks to itself with the name of + the shtool command like in `ln -s shtool install'. + This is useful for emulation situations. + [Paolo Bonzini , Ralf S. Engelschall] + + Changes between 1.4.2 and 1.4.3 (09-Jul-1999 to 11-Jul-1999): + + *) Fix the `a _directory_ named perl5 exists in $PATH' problem + also for `shtool path -m perl'. + [Justin Leonard Tripp ] + + *) Mention in the manual page that the order of documentation follows the + order of the modules in the generated script and that this order is + sorted by _topic_. + [Ralf S. Engelschall] + + Changes between 1.4.1 and 1.4.2 (07-Jul-1999 to 09-Jul-1999): + + *) Removed residual shebang lines on sh.* scripts. + [Gopal Narayanan ] + + *) Enhanced sh.guessos for more granular GNU/Linux detection. This + especially fixes problems when using the guessed id with libtool. + [Ralf S. Engelschall] + + *) Enhanced `shtool scpp': The generated function prototypes now + no longer contain the argument names to avoid namespace conflicts + [Ralf S. Engelschall] + + *) Fixed shtoolize.in: The chown() has to use $opt_o + [Denis Barbier ] + + Changes between 1.4.0 and 1.4.1 (02-Jul-1999 to 07-Jul-1999): + + *) Cleaned up usage messages. + [Ralf S. Engelschall, Denis Barbier ] + + *) Updated and cleaned up shtool.pod + [Ralf S. Engelschall] + + *) Added shtool -d for enabling shell trace information. + [Ralf S. Engelschall] + + *) Renamed shtool.gen to shtoolize.in and enhanced it to become the new + build frontend which now is also installed and can be used by developers + to build individual shtool scripts (which contain only a subset of the + functionality in case the developer doesn't need all functionality in + his source tree). + [Denis Barbier , Ralf S. Engelschall] + + *) Made sh.scpp more robust on brain-dead platforms where their `awk' is to + weak for the used Awk script. Instead we now search for gawk, then nawk + and finally for awk before using it. + [Ralf S. Engelschall, Martin Kraemer ] + + *) Be more friendly to developers and require only Autoconf 2.12 + [Denis Barbier ] + + *) Fixed typos related to `separate'. + [Martin Kraemer ] + + Changes between 1.3.3 and 1.4.0 (01-Jul-1999 to 02-Jul-1999): + + *) Fixed `shtool arx' command: it expected one argument too much, + shifted one argument too much and wasn't aware of `arx x lib.a'. + [Ralf S. Engelschall] + + *) Fixed `shtool echo -n' variant: Now Awk is only used as a fallback, + because it complains about some \xx sequences and there is no $seo for + Awk :-( [Ralf S. Engelschall] + + *) Added the first cut for a shtool test suite under `make test'. + [Ralf S. Engelschall] + + *) Additionally try `tput sgr0' to reset bold mode in sh.echo + [Denis Barbier ] + + *) Fix initializations for `bptype' variable in sh.version + [Denis Barbier ] + + *) Globally cleaned up -v (verbose), -d (debug) and -t (trace) options: + - Added -v (verbose) and -t (trace) options to "shtool move" + - Added -v (verbose) and -t (trace) options to "shtool install" + - Added -t (trace) option to "shtool mkdir" + - Renamed -v option to -t (trace) option for "shtool mkln" + - Renamed -d option to -t (trace) option for "shtool mkshadow" + - Added -t (trace) option to "shtool fixperm" + - Renamed -v option to -t (trace) option for "shtool arx" + [Ralf S. Engelschall] + + *) Fixed a path construction bug in "shtool install" and + added more error escapes + [Ralf S. Engelschall] + + *) Removed remaining trailing whitespaces from scripts + [Ralf S. Engelschall] + + Changes between 1.3.2 and 1.3.3 (28-Jun-1999 to 01-Jul-1999): + + *) Cleaned up usage of IFS and removed explicit default IFS + [Ralf S. Engelschall] + + *) Removed trailing whitespaces from all scripts + [Ralf S. Engelschall, Markus F.X.J. Oberhumer + ] + + *) Fixed error status handling in sh.move + [Markus F.X.J. Oberhumer ] + + Changes between 1.3.1 and 1.3.2 (28-Jun-1999 to 28-Jun-1999): + + *) Fixed a portability problem under SysV shells inside the source tree: + the sh.xxxx scripts have to include sh.common via ``. ./sh.common'' + instead of just ``. sh.common'' in order to find sh.common in the + source tree while bootstrapping. + [Ralf S. Engelschall, Lars Hecking ] + + Changes between 1.3.0 and 1.3.1 (25-Jun-1999 to 28-Jun-1999): + + *) Fixed directory checks in mkshadow command [Ralf S. Engelschall, + Evgeny Stambulchik ] + + *) Added -d (debug) and -a (symlink all) options to mkshadow command. + [Ralf S. Engelschall] + + Changes between 1.2.9 and 1.3.0 (02-Jun-1999 to 25-Jun-1999): + + *) Fixed handling of 'date +%y' fallback in sh.echo and sh.version + [Ralf S. Engelschall] + + *) Enhanced sh.echo's bold terminal sequence determination + [Ralf S. Engelschall] + + *) Written a completely new and more sophisticated option parsing code + which can be shared by all tools (sh.common). + [Ralf S. Engelschall] + + *) Completely overhauled all scripts and this way fixed a few bugs. But + especially all scripts now use the new option parsing code. + [Ralf S. Engelschall] + + *) Changed distribution license from BSD-style to GPL, but with an + important exception which is similar to libtool. This way all + advertisement clauses are gone and shtool is protected better. + Nevertheless the resulting shtool script can be used in _ANY_ software + package source tree. + [Ralf S. Engelschall] + + *) Added a new "shtool mdate" command for finding out and pretty-printing + the last modification date of a file or dir. + [Ralf S. Engelschall] + + *) Cleaned up usage descriptions + [Ralf S. Engelschall] + + *) Moved to the new official state of a GNU program, renamed + LICENSE to COPYING, etc. + [Ralf S. Engelschall] + + *) Fixed problems with brain-dead Awks in sh.echo + [Ralf S. Engelschall] + + *) Fixed problems with sed commands in sh.echo + [Ralf S. Engelschall] + + Changes between 1.2.8 and 1.2.9 (28-May-1999 to 02-Jun-1999): + + *) Fixed sh.echo (awk needs EOF on stdin) + [Ralf S. Engelschall] + + *) Fixed "tr"-stuff again in sh.version + [Ralf S. Engelschall] + + *) Added even more background details to shtool.pod + [Ralf S. Engelschall] + + *) Added INSTALL document + [Ralf S. Engelschall] + + Changes between 1.2.7 and 1.2.8 (14-May-1999 to 28-May-1999): + + *) Added a nifty sh.scpp for supporting library writing + [Ralf S. Engelschall] + + *) Fixed AIX determination in sh.guessos + [Ralf S. Engelschall] + + *) Optimized sh.echo's bold stuff + [Ralf S. Engelschall] + + Changes between 1.2.6 and 1.2.7 (13-May-1999 to 14-May-1999): + + *) Enhanced sh.guessos: Include release/version information for NetBSD, + OSF/1 and IRIX. Additionally extracted the shorter machine id for AIX. + [Ralf S. Engelschall] + + Changes between 1.2.5 and 1.2.6 (12-May-1999 to 13-May-1999): + + *) Added leading underscores in AS_HEADER and defines + used in the generated file of sh.version + [Ralf S. Engelschall] + + *) Fixed shtool message "Run ... -h" + [Ralf S. Engelschall] + + *) Added -s (silent) option to sh.fixperm and + made it's test -x portable as in sh.path + [Ralf S. Engelschall] + + *) Kicked out Apache-hack for Solaris detection in sh.guessos + [Ralf S. Engelschall] + + *) Merge into sh.guessos the BSDI 3.x and MacOS X support from AG + [Ralf S. Engelschall] + + Changes between 1.2.4 and 1.2.5 (11-May-1999 to 12-May-1999): + + *) Removed Apache relicts in sh.mkshadow: apaci, etc. + [Ralf S. Engelschall] + + *) Cleanups to Makefile.in + [Denis Barbier move -e + [Ralf S. Engelschall] + + *) Replaced \$ (an escaped dollar as text) in sh.version with $/ (an dollar + for "ident" and a harmless variable expansion for Perl itself), because + RCS' ident dislikes \$. [Denis Barbier ] + + *) Make sure `shtool path' doesn't create paths with doubled slashes + [Ralf S. Engelschall] + + *) Started a CREDITS file for keeping track of the contributors. + [Ralf S. Engelschall] + + *) Added -e (expand) feature to `shtool move' (similar to mmv) + [Ralf S. Engelschall] + + *) Require the preserved mode of `shtool move' to have option -p + [Ralf S. Engelschall] + + Changes between 1.2.1 and 1.2.2 (29-Apr-1999 to 05-May-1999): + + *) Added "-e " to sh.install + [Ralf S. Engelschall, Yitzchak Scott-Thoennes ] + + *) Fixed shtool generation: comments for version output was wrong + [Ralf S. Engelschall] + + *) Cleaned up sh.path "-x" test: no need for shebang and absolute /bin/sh + [Ralf S. Engelschall] + + *) Finally renamed "shtool version -v" to "shtool version -s" (s = set) + [Ralf S. Engelschall] + + Changes between 1.2.0 and 1.2.1 (29-Apr-1999 to 29-Apr-1999): + + *) Extended the shtool.pod manual page to cover additional details + [Ralf S. Engelschall] + + *) Cleaned up shtool.gen script + [Ralf S. Engelschall] + + *) Updated README and changed official name to "Portable Shell Tool" + [Ralf S. Engelschall] + + *) Inserted shtool into a CVS repository + [Ralf S. Engelschall] + + Changes between 1.1.0 and 1.2.0 (26-Apr-1999 to 29-Apr-1999): + + *) Added new ``arx'' tool for archiving libs in libs + [Ralf S. Engelschall] + + *) Added new ``mkln'' tool for creating relative symlinks + [Ralf S. Engelschall] + + *) The script order of the shtool ingredients is now preserved + [Ralf S. Engelschall] + + *) Changed "VERSION" to "shtool" in `shtool version' headers + [Ralf S. Engelschall] + + Changes between 1.0.0 and 1.1.0 (22-Apr-1999 to 26-Apr-1999): + + *) Cleaned up the usage page of shtool + [Ralf S. Engelschall] + + *) Written a complete documentation as a Unix manual page shtool(1) + [Ralf S. Engelschall] + + *) Renamed sh.ppl to sh.table and sh.newvers to sh.version + [Ralf S. Engelschall] + + *) Created a new sh.move tool + [Ralf S. Engelschall] + + *) Merged sh.info into sh.echo + [Ralf S. Engelschall] + + *) Merged sh.findprg, sh.findperl, sh.findcpp and sh.fp2rp into a new + sh.path tool. Additionally sh.path now contains the functionality of + dirname(1) and basename(1). + [Ralf S. Engelschall] + + *) Added Makefile.in for building shtool & shtool.1 and installing it + [Ralf S. Engelschall] + + *) Renamed *.sh to sh.* + [Ralf S. Engelschall] + + *) Added GNU Autoconf environment for perl and pod2man + [Ralf S. Engelschall] + + Changes between *GENESIS* and 1.0.0 (22-Apr-1999): + + *) Added Apache's GuessOS as sh.guessos + [Ralf S. Engelschall] + + *) Created the first shtool package by collecting all + scripts I've written over the last years for various + Open Source packages. + [Ralf S. Engelschall] Index: ossp-pkg/shtool/README RCS File: /v/ossp/cvs/ossp-pkg/shtool/README,v co -q -kk -p'1.64' '/v/ossp/cvs/ossp-pkg/shtool/README,v' | diff -u /dev/null - -L'ossp-pkg/shtool/README' 2>/dev/null --- ossp-pkg/shtool/README +++ - 2024-05-14 19:41:10.869951305 +0200 @@ -0,0 +1,71 @@ + _ _ _ + ___| |__ | |_ ___ ___ | | + / __| '_ \| __/ _ \ / _ \| | + \__ \ | | | || (_) | (_) | | + |___/_| |_|\__\___/ \___/|_| + + GNU shtool -- The GNU Portable Shell Tool + Copyright (c) 1994-2000 Ralf S. Engelschall + + http://www.gnu.org/software/shtool/ + ftp://ftp.gnu.org/gnu/shtool/ + + Version 1.4.10 (14-Jun-2000) + + The GNU shtool program is a compilation of small but very stable and + portable shell scripts into a single shell tool. All ingredients + were in successful use over many years in various free software + projects. The compiled shtool program is intended to be used inside + the source tree of free software packages. There it can take over + various (usually non-portable) tasks related to the building and + installation of such packages. + + It currently contains the following tools: + + echo Print string with optional construct expansion + mdate Pretty-print modification time of a file or dir + table Pretty print a field-sperarated list as a table + prop Display progress with a running propeller + move Move files with simultan substitution + install Install a program, script or datafile + mkdir Make one or more directories + mkln Make link with calculation of relative paths + mkshadow Make a shadow tree + fixperm Fix file permissions inside a source tree + tarball Roll distribution tarballs + guessos Simple OS/platform guesser + arx Extended archive command + slo Separate linker options by library class + scpp Sharing C Pre-Processor + version Generate and maintain a version information file + path Deal with program paths + + This program is 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 program 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 . + + Notice: Given that you include GNU shtool verbatim into your own + source tree, you are justified in saying that it remains separate from + your package, and that this way you are simply just using GNU shtool. + So, in this situation, there is no requirement that your package + itself is licensed under the GNU General Public License in order to + take advantage of GNU shtool. + + The documentation and latest release can be found on + + http://www.gnu.org/software/shtool/ + ftp://ftp.gnu.org/gnu/shtool/ + Ralf S. Engelschall + rse@engelschall.com + www.engelschall.com Index: ossp-pkg/shtool/VERSION RCS File: /v/ossp/cvs/ossp-pkg/shtool/VERSION,v co -q -kk -p'1.49' '/v/ossp/cvs/ossp-pkg/shtool/VERSION,v' | diff -u /dev/null - -L'ossp-pkg/shtool/VERSION' 2>/dev/null --- ossp-pkg/shtool/VERSION +++ - 2024-05-14 19:41:10.872727680 +0200 @@ -0,0 +1,3 @@ + + This is GNU shtool, Version 1.4.10 (14-Jun-2000) + Index: ossp-pkg/shtool/sh.install RCS File: /v/ossp/cvs/ossp-pkg/shtool/sh.install,v co -q -kk -p'1.16' '/v/ossp/cvs/ossp-pkg/shtool/sh.install,v' | diff -u /dev/null - -L'ossp-pkg/shtool/sh.install' 2>/dev/null --- ossp-pkg/shtool/sh.install +++ - 2024-05-14 19:41:10.875511459 +0200 @@ -0,0 +1,164 @@ +## +## install -- Install a program, script or datafile +## Copyright (c) 1997-2000 Ralf S. Engelschall +## Originally written 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="install" +str_usage="[-v] [-t] [-c] [-C] [-s] [-m] [-o] [-g] [-e] [ ...] " +arg_spec="2+" +opt_spec="v.t.c.C.s.m:o:g:e:" +opt_v=no +opt_t=no +opt_c=no +opt_C=no +opt_s=no +opt_m="" +opt_o="" +opt_g="" +opt_e="" + +. ./sh.common + +# determine source(s) and destination +argc=$# +srcs="" +while [ $# -gt 1 ]; do + srcs="$srcs $1" + shift +done +dstpath="$1" + +# type check for destination +dstisdir=0 +if [ -d $dstpath ]; then + dstpath=`echo "$dstpath" | sed -e 's:/$::'` + dstisdir=1 +fi + +# 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 +fi + +# iterate over all source(s) +for src in $srcs; do + dst=$dstpath + + # If destination is a directory, append the input filename + if [ $dstisdir = 1 ]; then + dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'` + dst="$dst/$dstfile" + fi + + # Add a possible extension to src and dst + if [ ".$opt_e" != . ]; then + src="$src$opt_e" + dst="$dst$opt_e" + fi + + # Check for correct arguments + if [ ".$src" = ".$dst" ]; then + echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2 + continue + fi + if [ -d "$src" ]; then + echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2 + continue + fi + + # Make a temp file name in the destination directory + dsttmp=`echo $dst |\ + sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \ + -e "s;\$;/#INST@$$#;"` + + # Verbosity + if [ ".$opt_v" = .yes ]; then + echo "$src -> $dst" 1>&2 + fi + + # Copy or move the file name to the temp name + # (because we might be not allowed to change the source) + if [ ".$opt_C" = .yes ]; then + opt_c=yes + fi + if [ ".$opt_c" = .yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "cp $src $dsttmp" 1>&2 + fi + cp $src $dsttmp || exit $? + else + if [ ".$opt_t" = .yes ]; then + echo "mv $src $dsttmp" 1>&2 + fi + mv $src $dsttmp || exit $? + fi + + # Adjust the target file + # (we do chmod last to preserve setuid bits) + if [ ".$opt_s" = .yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "strip $dsttmp" 1>&2 + fi + strip $dsttmp || exit $? + fi + if [ ".$opt_o" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chown $opt_o $dsttmp" 1>&2 + fi + chown $opt_o $dsttmp || exit $? + fi + if [ ".$opt_g" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chgrp $opt_g $dsttmp" 1>&2 + fi + chgrp $opt_g $dsttmp || exit $? + fi + if [ ".$opt_m" != . ]; then + if [ ".$opt_t" = .yes ]; then + echo "chmod $opt_m $dsttmp" 1>&2 + fi + chmod $opt_m $dsttmp || exit $? + fi + + # Determine whether to do a quick install + # (has to be done _after_ the strip was already done) + quick=no + if [ ".$opt_C" = .yes ]; then + if [ -r $dst ]; then + if cmp -s $src $dst; then + quick=yes + fi + fi + fi + + # Finally install the file to the real destination + if [ $quick = yes ]; then + if [ ".$opt_t" = .yes ]; then + echo "rm -f $dsttmp" 1>&2 + fi + rm -f $dsttmp + else + if [ ".$opt_t" = .yes ]; then + echo "rm -f $dst && mv $dsttmp $dst" 1>&2 + fi + rm -f $dst && mv $dsttmp $dst + fi +done + Index: ossp-pkg/shtool/shtoolize.in RCS File: /v/ossp/cvs/ossp-pkg/shtool/shtoolize.in,v co -q -kk -p'1.16' '/v/ossp/cvs/ossp-pkg/shtool/shtoolize.in,v' | diff -u /dev/null - -L'ossp-pkg/shtool/shtoolize.in' 2>/dev/null --- ossp-pkg/shtool/shtoolize.in +++ - 2024-05-14 19:41:10.878257838 +0200 @@ -0,0 +1,465 @@ +#!@PERL@ +## +## shtoolize -- Build shtool script out of ingredient scripts +## Copyright (c) 1999-2000 Ralf S. Engelschall +## +## 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 . +## + +require 5.000; +use strict; + +## +## CONFIGURATION +## + +# General configuration +my $version = "@SHTOOL_VERSION_STR@"; +my $prefix = "@prefix@"; +my $datadir = "@datadir@"; +my $scriptdir = "$datadir/shtool"; + +# Available modules +my @available = qw( + echo mdate table prop move install mkdir mkln mkshadow + fixperm tarball guessos arx slo scpp version path +); + +## +## COMMAND LINE HANDLING +## + +my $opt_h = 0; +my $opt_v = 0; +my $opt_q = 0; +my $opt_o = 'shtool'; + +# this subroutine is derived from Perl's getopts.pl with the enhancement of +# the "+" metacharater at the format string to allow a list to be build by +# subsequent occurance of the same option. We use it here as a local copy +# to be maximum independent. +sub mygetopt { + my ($progname, $argumentative, @ARGV) = @_; + my (@args, $first, $rest, $pos); + my ($errs) = 0; + local ($_); + local ($[) = 0; + + @args = split( / */, $argumentative); + while(@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { + ($first, $rest) = ($1,$2); + if ($_ =~ m|^--$|) { + shift(@ARGV); + last; + } + $pos = index($argumentative,$first); + if($pos >= $[) { + if($args[$pos+1] eq ':') { + shift(@ARGV); + if($rest eq '') { + unless (@ARGV) { + print STDERR "$progname:Error: incomplete option: `$first' (needs an argument)\n"; + ++$errs; + } + $rest = shift(@ARGV); + } + eval "\$opt_$first = \$rest;"; + } + elsif ($args[$pos+1] eq '+') { + shift(@ARGV); + if($rest eq '') { + unless (@ARGV) { + print STDERR "$progname:Error: incomplete option: `$first' (needs an argument)\n"; + ++$errs; + } + $rest = shift(@ARGV); + } + eval "push(\@opt_$first, \$rest);"; + } + else { + eval "\$opt_$first = 1"; + if($rest eq '') { + shift(@ARGV); + } + else { + $ARGV[0] = "-$rest"; + } + } + } + else { + print STDERR "$progname:Error: unknown option: `$first'\n"; + ++$errs; + if($rest ne '') { + $ARGV[0] = "-$rest"; + } + else { + shift(@ARGV); + } + } + } + return ($errs == 0, @ARGV); +} + +sub usage { + my ($progname, $cmdline, $rc) = @_; + print STDERR "Usage: shtoolize [-h] [-v] [-q] [-o