From f8908a437126c15e1e5090b0447f62d8ee2594ad Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 23 Dec 2011 16:49:59 +0000 Subject: [PATCH] Write header in the files generated by create_undef.pl Header includes license, creation timestamp and input filename git-svn-id: http://svn.osgeo.org/postgis/trunk@8532 b70326c6-7e19-0410-871a-916f4a2858ee --- utils/create_undef.pl | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/utils/create_undef.pl b/utils/create_undef.pl index 91b15dfb3..aa8752ff9 100755 --- a/utils/create_undef.pl +++ b/utils/create_undef.pl @@ -14,12 +14,11 @@ use warnings; use strict; +use POSIX 'strftime'; eval "exec perl -w $0 $@" if (0); -# perl create_undef.pl -# creates a new sql script to delete all the postgis functions et al. ($#ARGV == 1) || die "Usage: perl create_undef.pl \nCreates a new SQL script to delete all the PostGIS functions.\n"; @@ -46,7 +45,27 @@ my @tables = (); my $version = $ARGV[1]; -print "BEGIN;\n"; +my $time = POSIX::strftime("%c", localtime); +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "-- \n"; +print "-- PostGIS - Spatial Types for PostgreSQL \n"; +print "-- http://postgis.refractions.net \n"; +print "-- \n"; +print "-- This is free software; you can redistribute and/or modify it under \n"; +print "-- the terms of the GNU General Public Licence. See the COPYING file. \n"; +print "-- \n"; +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "-- \n"; +print "-- Generated on: " . $time . "\n"; +print "-- by: " . $0 . "\n"; +print "-- from: " . $ARGV[0] . "\n"; +print "-- \n"; +print "-- Do not edit manually, your changes will be lost.\n"; +print "-- \n"; +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "\n"; + +print "BEGIN;\n\n"; open( INPUT, $ARGV[0] ) || die "Couldn't open file: $ARGV[0]\n"; -- 2.40.0