security/nss/coreconf/version.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/coreconf/version.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +#!/usr/sbin/perl
     1.5 +#
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +# Compose lowercase alphabet
    1.11 +@alphabet = ( "a", "b", "c", "d", "e", "f", "g", "h",
    1.12 +              "i", "j", "k", "l", "m", "n", "o", "p",
    1.13 +              "q", "r", "s", "t", "u", "v", "w", "x",
    1.14 +              "y", "z" );
    1.15 +
    1.16 +# Compute year
    1.17 +$year = (localtime)[5] + 1900;
    1.18 +
    1.19 +# Compute month
    1.20 +$month = (localtime)[4] + 1;
    1.21 +
    1.22 +# Compute day
    1.23 +$day = (localtime)[3];
    1.24 +
    1.25 +# Compute base build number
    1.26 +$version = sprintf( "%d%02d%02d", $year, $month, $day );
    1.27 +$directory = sprintf( "%s\/%s\/%d%02d%02d", $ARGV[0], $ARGV[1], $year, $month, $day );
    1.28 +
    1.29 +# Print out the name of the first version directory which does not exist
    1.30 +#if( ! -e  $directory )
    1.31 +#{
    1.32 +    print $version;
    1.33 +#}
    1.34 +#else
    1.35 +#{
    1.36 +#    # Loop through combinations
    1.37 +#    foreach $ch1 (@alphabet)
    1.38 +#    {
    1.39 +#	foreach $ch2 (@alphabet)
    1.40 +#	{
    1.41 +#	    $version = sprintf( "%d%02d%02d%s%s", $year, $month, $day, $ch1, $ch2 );
    1.42 +#	    $directory = sprintf( "%s\/%s\/%d%02d%02d%s%s", $ARGV[0], $ARGV[1], $year, $month, $day, $ch1, $ch2 );
    1.43 +#	    if( ! -e  $directory )
    1.44 +#	    {
    1.45 +#		print STDOUT $version;
    1.46 +#		exit;
    1.47 +#	    }
    1.48 +#	}
    1.49 +#    }
    1.50 +#}
    1.51 +

mercurial