X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fdofile.pl;h=8b0c7b41c0667749aa9030252225886ff303210b;hp=983778f170c11efe36f4c2d3590aa2f968b4eb9e;hb=121677b4875b08df99a48d20ab5c26f54782f21d;hpb=58163021e29530e99aea85eafe8653907bff03a8 diff --git a/util/dofile.pl b/util/dofile.pl index 983778f170..8b0c7b41c0 100644 --- a/util/dofile.pl +++ b/util/dofile.pl @@ -1,5 +1,11 @@ -#! /usr/bin/perl +#! /usr/bin/env perl +# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. # +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + # Reads one or more template files and runs it through Text::Template # # It is assumed that this scripts is called with -Mconfigdata, a module @@ -153,7 +159,11 @@ my @autowarntext = ("WARNING: do not edit!", my $prev_linecount = 0; my $text = @ARGV - ? join("", map { my $x = "{- output_reset_on() -}".Text::Template::_load_text($_); + ? join("", map { my $x = Text::Template::_load_text($_); + if (!defined($x)) { + die $Text::Template::ERROR, "\n"; + } + $x = "{- output_reset_on() -}" . $x; my $linecount = $x =~ tr/\n//; $prev_linecount = ($linecount += $prev_linecount); $lines{$linecount} = $_;