Renamed rpmprune.PL to rpmprune (MakeMaker now handles fixing up #! line).

CVS patchset: 4065
CVS date: 2000/08/15 07:59:24
This commit is contained in:
rjray 2000-08-15 07:59:24 +00:00
parent 32bff1c05b
commit 6907b0b354
1 changed files with 2 additions and 44 deletions

46
Perl-RPM/utils/rpmprune.PL → Perl-RPM/utils/rpmprune Normal file → Executable file
View File

@ -1,41 +1,4 @@
#!/usr/local/bin/perl
use Config;
use File::Basename qw(&basename &dirname);
# List explicitly here the variables you want Configure to
# generate. Metaconfig only looks for shell variables, so you
# have to mention them as if they were shell variables, not
# %Config entries. Thus you write
# $startperl
# to ensure Configure will look for $Config{startperl}.
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
chdir(dirname($0));
($file = basename($0)) =~ s/\.PL$//;
$file =~ s/\.pl$//
if ($Config{'osname'} eq 'VMS' or
$Config{'osname'} eq 'OS2'); # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
print "Extracting $file (with variable substitutions)\n";
# In this section, perl variables will be expanded during extraction.
# You can use $Config{...} to use Configure variables.
print OUT <<"!GROK!THIS!";
$Config{'startperl'}
eval 'exec perl -S \$0 "\$@"'
if 0;
!GROK!THIS!
# In the following, perl variables are not expanded during extraction.
print OUT <<'!NO!SUBS!';
eval 'exec perl -S $0 "$@"'
if 0;
#!/usr/bin/perl
use strict;
use vars qw($USAGE $VERSION $revision $cmd %opts $file $hdr $installed $ret);
@ -47,7 +10,7 @@ use RPM::Database qw(%RPM);
use RPM::Header;
$cmd = basename $0;
$revision = q$Revision: 1.3 $;
$revision = q$Revision: 1.1 $;
$VERSION = sprintf("%d.%02d", $revision =~ /(\d+)\.(\d+)/);
$USAGE = "USAGE:
$cmd [ --newer ] [ --older ] [ --equal ] [ --uninst ]
@ -194,8 +157,3 @@ The C<--invert> option is applied last, after all others have been processed.
=head1 AUTHOR
Randy J. Ray <rjray@blackperl.com>
!NO!SUBS!
close OUT or die "Can't close $file: $!";
chmod 0755, $file or die "Can't reset permissions for $file: $!\n";
exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';