ants.pl
author A.M. Thurnherr <athurnherr@yahoo.com>
Thu, 17 Mar 2016 12:26:02 -0400
changeset 27 abeaad5308ba
parent 26 cfee523c4432
child 28 db6c3d13f8be
permissions -rw-r--r--
V6.5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     1
#!/usr/bin/perl
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     2
#======================================================================
9
1a7983cbb82a automatic version checking; abbreviated layout and %PARAM def; ubtest okay
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 8
diff changeset
     3
#                    A N T S . P L 
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     4
#                    doc: Fri Jun 19 14:01:06 1998
27
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 26
diff changeset
     5
#                    dlm: Thu Mar 17 12:02:55 2016
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     6
#                    (c) 1998 A.M. Thurnherr
27
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 26
diff changeset
     7
#                    uE-Info: 26 21 NIL 0 0 72 2 2 4 NIL ofnI
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     8
#======================================================================
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
     9
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    10
# HISTORY:
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    11
#  Jun 19, 1998: - apparently created
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    12
#  Jul  3, 2006: - added support for ANTS_PERL
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    13
#  Jul  5, 2006: - removed `basename`
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    14
#  Jul 19, 2006: - added error if exec($ANTS_PERL) fails
3
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    15
#  Sep 24, 2012: - added support for $ANTSLIB
20
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 15
diff changeset
    16
#  Oct 29, 2014: - added $antsLibVersion with compile-time version check (V6.0)
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 15
diff changeset
    17
#  May 17, 2015: - updated to V6.1
23
a4fef65fd959 V6.2 release candidate
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 20
diff changeset
    18
#  Oct 12, 2015: - updated to V6.2 (for LADCP_w 1.0)
26
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 25
diff changeset
    19
#  Mar  8, 2016: - updated to V6.3 (for LADCP_w 1.2beta)
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 25
diff changeset
    20
#  Mar 16, 2016: - updated to V6.4 (for LADCP_w 1.2beta5)
27
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 26
diff changeset
    21
#  Mar 17, 2016: - updated to V6.5
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    22
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    23
exec($ENV{ANTS_PERL},$0,@ARGV),die("$ENV{ANTS_PERL}: $!")
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    24
    if (defined($ENV{ANTS_PERL}) && $^X ne $ENV{ANTS_PERL});
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    25
27
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 26
diff changeset
    26
$antsLibVersion = 6.5;
26
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 25
diff changeset
    27
9
1a7983cbb82a automatic version checking; abbreviated layout and %PARAM def; ubtest okay
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 8
diff changeset
    28
die(sprintf("$0: obsolete library V%.1f; V%.1f required\n",
1a7983cbb82a automatic version checking; abbreviated layout and %PARAM def; ubtest okay
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 8
diff changeset
    29
	$antsLibVersion,$antsMinLibVersion))
1a7983cbb82a automatic version checking; abbreviated layout and %PARAM def; ubtest okay
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 8
diff changeset
    30
		if (!defined($antsMinLibVersion) || $antsMinLibVersion>$antsLibVersion);
8
248fef05e79d begin Version 6.0
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 3
diff changeset
    31
3
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    32
if (defined($ANTSLIB)) {							# new style (V5)
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    33
	require "$ANTSLIB/antsusage.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    34
	require "$ANTSLIB/antsio.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    35
	require "$ANTSLIB/antsutils.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    36
	require "$ANTSLIB/antsexprs.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    37
	$ANTS = $ANTSLIB;								# backward compatibility
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    38
} elsif (defined($ANTS)) {							# old style
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    39
	require "$ANTS/antsusage.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    40
	require "$ANTS/antsio.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    41
	require "$ANTS/antsutils.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    42
	require "$ANTS/antsexprs.pl";
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    43
} else {
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    44
	die("neither \$ANTS nor \$ANTSLIB defined\n");
A.M. Thurnherr <athurnherr@yahoo.com>
parents: 0
diff changeset
    45
}
0
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    46
A.M. Thurnherr <athurnherr@yahoo.com>
parents:
diff changeset
    47
1;