]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
look for #! to determine if the file is PYTHON or PYTHON-BIN
authorMark Andrews <marka@isc.org>
Mon, 5 Feb 2018 00:31:36 +0000 (11:31 +1100)
committerMark Andrews <marka@isc.org>
Mon, 5 Feb 2018 00:39:43 +0000 (11:39 +1100)
util/merge_copyrights

index ba23bc592afc23b6fc33e5c57a89c72b1aef72ac..55b9f97c3bbad793d95f9fc69d63a50399b9686f 100644 (file)
@@ -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$/ ||