diff options
author | Ken Raeburn <raeburn@mit.edu> | 2007-09-24 22:05:56 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2007-09-24 22:05:56 +0000 |
commit | 5386b775b2fbce68cbc846f7dac3ef495e72457a (patch) | |
tree | 34e1350d51f8265d21fc69f47e293ea1dec1b8c1 /src/windows/build/which.pl | |
parent | ecdd7622b03b8e3ffa1dce68e081fca9e9b0aa70 (diff) | |
download | krb5-5386b775b2fbce68cbc846f7dac3ef495e72457a.tar.gz krb5-5386b775b2fbce68cbc846f7dac3ef495e72457a.tar.xz krb5-5386b775b2fbce68cbc846f7dac3ef495e72457a.zip |
Set svn:eol-style on a bunch of text-looking files that didn't have it
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19972 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/build/which.pl')
-rw-r--r-- | src/windows/build/which.pl | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/src/windows/build/which.pl b/src/windows/build/which.pl index 1cf89ce571..8f3527c146 100644 --- a/src/windows/build/which.pl +++ b/src/windows/build/which.pl @@ -1,69 +1,69 @@ -#!perl -w
-
-use strict;
-use Config;
-use File::Basename;
-use Getopt::Long;
-
-$0 = fileparse($0);
-
-sub main
-{
- Getopt::Long::Configure('bundling', 'no_auto_abbrev',
- 'no_getopt_compat', 'require_order',
- 'ignore_case', 'pass_through',
- 'prefix_pattern=(--|-|\+|\/)',
- );
- my $OPT = {};
- GetOptions($OPT,
- 'help|h|?',
- 'all|a',
- 'quiet|q',
- 'debug|d',
- 'path:s',
- );
-
- my $f = shift @ARGV;
- if ($OPT->{help} || !$f) {
- usage();
- exit(0) if $OPT->{help};
- exit(1);
- }
-
- my $p = $OPT->{path} || $ENV{PATH};
- my $s = $Config{path_sep};
- my @d = split(/$s/, $p);
- my @e = split(/$s/, lc($ENV{PATHEXT} || '.bat;.exe;.com'));
- my @f = ($f, map { $f.$_; } @e);
- my $found = 0;
- foreach my $d (@d) {
- print "(Searching $d)\n" if $OPT->{debug};
- foreach my $f (@f) {
- my $df = $d.'\\'.$f; # cannot use $File::Spec->catfile due to UNC.
- print "(Checking for $df)\n" if $OPT->{debug};
- if (-f $df) {
- exit(0) if $OPT->{quiet};
- print "$df\n";
- exit(0) if !$OPT->{all};
- $found = 1;
- }
- }
- }
- print "Could not find $f\n" if !$found && !$OPT->{quiet};
- exit($found?0:1);
-}
-
-sub usage
-{
- print <<USAGE;
-Usage: $0 [options] command
- command find file executed by this command by looking at PATH
- -d, --debug debug output
- -a, --all find all such commands in PATH
- -q, --quiet no output, exit with non-zero errorcode if not found
- --path PATHARG search PATHARG instead of the PATH environment variable
- -?, -H, --help help
-USAGE
-}
-
-main();
+#!perl -w + +use strict; +use Config; +use File::Basename; +use Getopt::Long; + +$0 = fileparse($0); + +sub main +{ + Getopt::Long::Configure('bundling', 'no_auto_abbrev', + 'no_getopt_compat', 'require_order', + 'ignore_case', 'pass_through', + 'prefix_pattern=(--|-|\+|\/)', + ); + my $OPT = {}; + GetOptions($OPT, + 'help|h|?', + 'all|a', + 'quiet|q', + 'debug|d', + 'path:s', + ); + + my $f = shift @ARGV; + if ($OPT->{help} || !$f) { + usage(); + exit(0) if $OPT->{help}; + exit(1); + } + + my $p = $OPT->{path} || $ENV{PATH}; + my $s = $Config{path_sep}; + my @d = split(/$s/, $p); + my @e = split(/$s/, lc($ENV{PATHEXT} || '.bat;.exe;.com')); + my @f = ($f, map { $f.$_; } @e); + my $found = 0; + foreach my $d (@d) { + print "(Searching $d)\n" if $OPT->{debug}; + foreach my $f (@f) { + my $df = $d.'\\'.$f; # cannot use $File::Spec->catfile due to UNC. + print "(Checking for $df)\n" if $OPT->{debug}; + if (-f $df) { + exit(0) if $OPT->{quiet}; + print "$df\n"; + exit(0) if !$OPT->{all}; + $found = 1; + } + } + } + print "Could not find $f\n" if !$found && !$OPT->{quiet}; + exit($found?0:1); +} + +sub usage +{ + print <<USAGE; +Usage: $0 [options] command + command find file executed by this command by looking at PATH + -d, --debug debug output + -a, --all find all such commands in PATH + -q, --quiet no output, exit with non-zero errorcode if not found + --path PATHARG search PATHARG instead of the PATH environment variable + -?, -H, --help help +USAGE +} + +main(); |