#! /bin/sh # This is the LHEA perl script: /cvmfs/extras-fp7.egi.eu/extras/heasoft/demo/x86_64-unknown-linux-gnu-libc2.19-0/bin/perldemo # The purpose of this special block is to make this script work with # the user's local perl, regardless of where that perl is installed. # The variable LHEAPERL is set by the initialization script to # point to the local perl installation. #------------------------------------------------------------------------------- eval ' if [ "x$LHEAPERL" = x ]; then echo "Please run standard LHEA initialization before attempting to run /cvmfs/extras-fp7.egi.eu/extras/heasoft/demo/x86_64-unknown-linux-gnu-libc2.19-0/bin/perldemo." exit 3 elif [ "$LHEAPERL" = noperl ]; then echo "During LHEA initialization, no acceptable version of Perl was found." echo "Cannot execute script /cvmfs/extras-fp7.egi.eu/extras/heasoft/demo/x86_64-unknown-linux-gnu-libc2.19-0/bin/perldemo." exit 3 elif [ `$LHEAPERL -v < /dev/null 2> /dev/null | grep -ic "perl"` -eq 0 ]; then echo "LHEAPERL variable does not point to a usable perl." exit 3 else # Force Perl into 32-bit mode (to match the binaries) if necessary: if [ "x$HD_BUILD_ARCH_32_BIT" = xyes ]; then if [ `$LHEAPERL -V 2> /dev/null | grep -ic "USE_64_BIT"` -ne 0 ]; then VERSIONER_PERL_PREFER_32_BIT=yes export VERSIONER_PERL_PREFER_32_BIT fi fi exec $LHEAPERL -x $0 ${1+"$@"} fi ' if(0); # Do not delete anything above this comment from an installed LHEA script! #------------------------------------------------------------------------------- #! /usr/bin/perl # # This is an example Perl script for use in HEAdas. It has a parameter # file just like a compiled task and the interface to that is best # handled via the 'pquery2' utility (see below). The name of the Perl # executable is optional -- the lhea-fixperl utility should be run # from the script's Makefile to prepend a block to the script which # will use the LHEAPERL environment variable at runtime to determine # the correct Perl executable to use. # #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # Note that the name of the Perl executable in the first line is # irrelevant since the script lhea-fixperl will be called to append # a block of shell code which is designed to use the value of the # LHEAPERL environment variable at runtime. This variable is set # during standard HEAdas initialization (ie, headas-init.csh) and # the correct value is determined when the package is configured # and installed. # The following is an example of a Perl subroutine library which goes # with the script. It lives in the Perl task directory and during # installation is placed in $HEADAS/lib/perl. That location is # appended to the user's PERLLIB or PERL5LIB variable by the # HEAdas initialization script. require "perldemo_utils.pl"; if (grep {$_ eq "-h"} @ARGV) { print <