From b2093e3016027d6b5cf06b3f91f30769bfc099e2 Mon Sep 17 00:00:00 2001 From: cvsadm Date: Fri, 21 Jan 2005 00:44:34 +0000 Subject: Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. (foxworth) --- ntversion.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ntversion.pl (limited to 'ntversion.pl') diff --git a/ntversion.pl b/ntversion.pl new file mode 100644 index 00000000..ced691e2 --- /dev/null +++ b/ntversion.pl @@ -0,0 +1,34 @@ +# +# BEGIN COPYRIGHT BLOCK +# Copyright 2001 Sun Microsystems, Inc. +# Portions copyright 1999, 2001-2003 Netscape Communications Corporation. +# All rights reserved. +# END COPYRIGHT BLOCK +# +@date = localtime(); +$FILEVERSION = &doubleDigit( $date[5] ) . ',' . # year + &doubleDigit( $date[4] + 1 ) . ',' . # month + &doubleDigit( $date[3] ) . ',' . # date + &doubleDigit( $date[2] ); +$FILEVERSIONTEXT = '"' . &doubleDigit( $date[4] ) . '/' . # month + &doubleDigit( $date[3] ) . '/' . # date + &doubleDigit( $date[5] ) . ' ' . # year + &doubleDigit( $date[2] ) . ':' . # hour + &doubleDigit( $date[1] ) . '"'; # minute +$MAJORVERSION=$ARGV[1]; +$MINORVERSION=$ARGV[2]; + +open(VERSIONFILE, ">$ARGV[0]/ldapserver/include/nt/ntversion.h"); +print VERSIONFILE "// This file is automatically generated.\r\n"; +print VERSIONFILE "// Please do not edit this file manually.\r\n"; +print VERSIONFILE "// It contains the version number of this build.\r\n"; +print VERSIONFILE "\r\n"; +print VERSIONFILE "#define VERSION $FILEVERSION\r\n"; +print VERSIONFILE "#define PRODUCT $MAJORVERSION,0,0,$MINORVERSION\r\n"; +print VERSIONFILE "#define VERSIONTEXT $FILEVERSIONTEXT\r\n"; +print VERSIONFILE "#define PRODUCTTEXT \"$MAJORVERSION.$MINORVERSION\"\r\n"; +close( VERSIONFILE ); + +sub doubleDigit { + $_[0] > 9 ? $_[0] : '0' . $_[0]; +} -- cgit