head 1.41; access; symbols SHTOOL_2_0_8:1.41 SHTOOL_2_0_7:1.40 SHTOOL_2_0_6:1.38 SHTOOL_2_0_5:1.38 SHTOOL_2_0_4:1.38 SHTOOL_2_0_3:1.35 SHTOOL_2_0_2:1.35 SHTOOL_2_0_1:1.34 SHTOOL_2_0_0:1.34 SHTOOL_2_0b3:1.34 SHTOOL_2_0b2:1.34 SHTOOL_2_0b1:1.34 SHTOOL_1_6:1.28.0.2 SHTOOL_1_6_2:1.28 SHTOOL_1_6_1:1.28 SHTOOL_1_6_0:1.28 SHTOOL_1_5:1.23.0.2 SHTOOL_1_5_4:1.23 SHTOOL_1_5_3:1.22 SHTOOL_1_5_2:1.20 SHTOOL_1_5_1:1.19 SHTOOL_1_5_0:1.19 SHTOOL_1_4_9:1.15 SHTOOL_1_4_8:1.15 SHTOOL_1_4_7:1.13 SHTOOL_1_4_6:1.13 SHTOOL_1_4_5:1.13 SHTOOL_1_4_4:1.12 SHTOOL_1_4_3:1.7 SHTOOL_1_4_2:1.7 SHTOOL_1_4_1:1.6; locks; strict; comment @# @; 1.41 date 2008.04.02.20.13.44; author rse; state Exp; branches; next 1.40; commitid eB5Wirx8MdMyDzXs; 1.40 date 2007.05.19.19.09.39; author rse; state Exp; branches; next 1.39; commitid OPUF1UBbllBTwzis; 1.39 date 2007.05.19.19.06.08; author rse; state Exp; branches; next 1.38; commitid WGA9xRFFLAU2wzis; 1.38 date 2006.02.04.09.43.26; author rse; state Exp; branches; next 1.37; commitid oWk7BmnyAitJtfkr; 1.37 date 2005.10.12.12.39.17; author rse; state Exp; branches; next 1.36; 1.36 date 2005.10.12.12.34.50; author rse; state Exp; branches; next 1.35; 1.35 date 2005.06.15.08.14.36; author rse; state Exp; branches; next 1.34; 1.34 date 2004.02.12.16.06.27; author rse; state Exp; branches; next 1.33; 1.33 date 2004.01.01.16.54.20; author rse; state Exp; branches; next 1.32; 1.32 date 2003.12.13.21.23.55; author rse; state Exp; branches; next 1.31; 1.31 date 2003.08.13.14.20.34; author rse; state Exp; branches; next 1.30; 1.30 date 2003.02.11.13.00.50; author rse; state Exp; branches; next 1.29; 1.29 date 2003.02.11.12.56.40; author rse; state Exp; branches; next 1.28; 1.28 date 2001.12.31.15.10.59; author rse; state Exp; branches; next 1.27; 1.27 date 2001.12.31.15.06.04; author rse; state Exp; branches; next 1.26; 1.26 date 2001.09.23.11.15.57; author rse; state Exp; branches; next 1.25; 1.25 date 2001.09.23.10.58.10; author rse; state Exp; branches; next 1.24; 1.24 date 2001.06.14.19.02.54; author rse; state Exp; branches; next 1.23; 1.23 date 2001.06.14.14.24.17; author rse; state Exp; branches; next 1.22; 1.22 date 2001.04.19.07.54.50; author rse; state Exp; branches; next 1.21; 1.21 date 2001.04.19.07.46.41; author rse; state Exp; branches; next 1.20; 1.20 date 2001.01.17.09.55.11; author rse; state Exp; branches; next 1.19; 1.19 date 2000.06.30.18.09.13; author rse; state Exp; branches; next 1.18; 1.18 date 2000.06.30.16.52.08; author rse; state Exp; branches; next 1.17; 1.17 date 2000.06.14.18.50.13; author rse; state Exp; branches; next 1.16; 1.16 date 2000.06.14.18.43.24; author rse; state Exp; branches; next 1.15; 1.15 date 2000.03.12.11.12.21; author rse; state Exp; branches; next 1.14; 1.14 date 2000.02.08.15.42.37; author rse; state Exp; branches; next 1.13; 1.13 date 99.07.28.06.48.51; author rse; state Exp; branches; next 1.12; 1.12 date 99.07.17.14.46.07; author rse; state Exp; branches; next 1.11; 1.11 date 99.07.17.14.45.45; author rse; state Exp; branches; next 1.10; 1.10 date 99.07.17.14.28.40; author rse; state Exp; branches; next 1.9; 1.9 date 99.07.17.11.01.14; author rse; state Exp; branches; next 1.8; 1.8 date 99.07.15.13.42.39; author rse; state Exp; branches; next 1.7; 1.7 date 99.07.09.06.05.53; author rse; state Exp; branches; next 1.6; 1.6 date 99.07.07.14.29.09; author rse; state Exp; branches; next 1.5; 1.5 date 99.07.07.14.15.23; author rse; state Exp; branches; next 1.4; 1.4 date 99.07.07.12.03.19; author rse; state Exp; branches; next 1.3; 1.3 date 99.07.07.11.59.57; author rse; state Exp; branches; next 1.2; 1.2 date 99.07.07.06.46.00; author rse; state Exp; branches; next 1.1; 1.1 date 99.07.07.06.43.04; author rse; state Exp; branches; next ; desc @@ 1.41 log @adjust copyright for year 2008 @ text @#!@@PERL@@ ## ## shtoolize -- Build shtool script out of ingredient scripts ## Copyright (c) 1999-2008 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 $datarootdir = "@@datarootdir@@"; my $datadir = "@@datadir@@"; my $scriptdir = "$datadir/shtool"; # Available modules my @@available = qw( echo mdate table prop move install mkdir mkln mkshadow fixperm rotate tarball subst platform 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