summaryrefslogtreecommitdiff
path: root/dh_getopt.pl
diff options
context:
space:
mode:
authorunknown <unknown>2003-07-28 18:46:45 +0000
committerunknown <unknown>2003-07-28 18:46:45 +0000
commitdbc89b1ded196ec3b668623e0cc4c37046066994 (patch)
tree3440045c9512ba755f6b3a08c021a28174ef1055 /dh_getopt.pl
parent63e45075003b1d9fcff097b5644a81131c346653 (diff)
downloaddebhelper-version_1.2.20.tar.gz
r1009: This commit was manufactured by cvs2svn to create tagversion_1.2.20
'upstream_version_1_2_20'.
Diffstat (limited to 'dh_getopt.pl')
-rwxr-xr-xdh_getopt.pl57
1 files changed, 0 insertions, 57 deletions
diff --git a/dh_getopt.pl b/dh_getopt.pl
deleted file mode 100755
index 4d1d3903..00000000
--- a/dh_getopt.pl
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/perl
-#
-# Because the getopt() program is so horribly broken, I wrote my own argument
-# processer that uses the find Getopt::Long module. This is used by all
-# debhelper shell scripts.
-#
-# Joey Hess, GPL copyright 1998.
-
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
-use strict;
-use Dh_Getopt;
-
-# This is a tricky (and nasty) bit: override the error() function, which
-# comes from Dh_Lib, with one of our own so we print out the list of errors
-# to the shell, which can do what it wants with them.
-sub Dh_Getopt::error { my $message=shift;
- print "DH_PARSE_ERROR='$message'\n";
- exit 1;
-}
-
-# Parse options.
-my %options=Dh_Getopt::parseopts();
-
-# Change a few lists in %options into strings,
-# generate some options that only need to be visible to the
-# shell scripts so Dh_Getopt doesn't bother generating.
-$options{DOPACKAGES}=join " ",@{$options{DOPACKAGES}};
-if ($#{$options{EXCLUDE}} > -1) {
- $options{EXCLUDE_GREP}=join '|', @{$options{EXCLUDE}};
-}
-$options{EXCLUDE}=join " ",@{$options{EXCLUDE}};
-
-# Check to see if DH_VERBOSE environment variable was set, if so,
-# make sure verbose is on.
-if (defined $main::ENV{DH_VERBOSE}) {
- if ($main::ENV{DH_VERBOSE} ne undef) {
- $options{VERBOSE}=1;
- }
-}
-
-# Check to see if DH_NO_ACT environment variable was set, if so,
-# make sure no act mode is on.
-if (defined $main::ENV{DH_NO_ACT}) {
- if ($main::ENV{DH_NO_ACT} ne undef) {
- $options{NO_ACT}=1;
- }
-}
-
-# Now output everything, in a format suitable for a shell to eval it.
-foreach (keys(%options)) {
- if (defined $options{$_}) {
- print "DH_$_='$options{$_}'\n";
- }
-}
-
-# This sets $@ in the shell to whatever arguements remain.
-print "set -- @ARGV\n"