ants.pl
author A.M. Thurnherr <athurnherr@yahoo.com>
Thu, 05 Mar 2015 12:58:39 -0500
changeset 15 ebd8a4ddd7f2
parent 14 4097040ad31c
parent 9 1a7983cbb82a
child 20 7ea1fd9d64e6
permissions -rw-r--r--
merged

#!/usr/bin/perl
#======================================================================
#                    A N T S . P L 
#                    doc: Fri Jun 19 14:01:06 1998
#                    dlm: Thu Oct 30 09:33:41 2014
#                    (c) 1998 A.M. Thurnherr
#                    uE-Info: 22 55 NIL 0 0 72 2 2 4 NIL ofnI
#======================================================================

# HISTORY:
#  Jun 19, 1998: - apparently created
#  Jul  3, 2006: - added support for ANTS_PERL
#  Jul  5, 2006: - removed `basename`
#  Jul 19, 2006: - added error if exec($ANTS_PERL) fails
#  Sep 24, 2012: - added support for $ANTSLIB
#  Oct 29, 2014: - added $antsLibVersion with compile-time version check

exec($ENV{ANTS_PERL},$0,@ARGV),die("$ENV{ANTS_PERL}: $!")
    if (defined($ENV{ANTS_PERL}) && $^X ne $ENV{ANTS_PERL});

$antsLibVersion = 6.0;
die(sprintf("$0: obsolete library V%.1f; V%.1f required\n",
	$antsLibVersion,$antsMinLibVersion))
		if (!defined($antsMinLibVersion) || $antsMinLibVersion>$antsLibVersion);

if (defined($ANTSLIB)) {							# new style (V5)
	require "$ANTSLIB/antsusage.pl";
	require "$ANTSLIB/antsio.pl";
	require "$ANTSLIB/antsutils.pl";
	require "$ANTSLIB/antsexprs.pl";
	$ANTS = $ANTSLIB;								# backward compatibility
} elsif (defined($ANTS)) {							# old style
	require "$ANTS/antsusage.pl";
	require "$ANTS/antsio.pl";
	require "$ANTS/antsutils.pl";
	require "$ANTS/antsexprs.pl";
} else {
	die("neither \$ANTS nor \$ANTSLIB defined\n");
}

1;