mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-21 08:50:32 -05:00
look for #! to determine if the file is PYTHON or PYTHON-BIN
(cherry picked from commit 4fcc550877)
This commit is contained in:
parent
5c36169128
commit
b480d1eaa8
1 changed files with 5 additions and 0 deletions
|
|
@ -69,6 +69,11 @@ while (<CHANGES>) {
|
|||
$file_types{$_} = "PERL";
|
||||
} elsif ($base =~ /\.py$/i) {
|
||||
$file_types{$_} = "PYTHON";
|
||||
if (open(PYTHON, $_)) {
|
||||
my $line = <PYTHON>;
|
||||
$file_types{$_} = "PYTHON-BIN" if ($line && $line =~ /^#!/);
|
||||
close(PYTHON);
|
||||
}
|
||||
} elsif ($base =~ /\.sh$/) {
|
||||
$file_types{$_} = "SH";
|
||||
} elsif ($base =~ /\.docbook$/ ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue