#! /bin/sh # This is the LHEA perl script: /cvmfs/extras-fp7.egi.eu/extras/heasoft/ftools/x86_64-unknown-linux-gnu-libc2.19-0/bin/fparhelp # 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/ftools/x86_64-unknown-linux-gnu-libc2.19-0/bin/fparhelp." 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/ftools/x86_64-unknown-linux-gnu-libc2.19-0/bin/fparhelp." 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/local/bin/perl # # fhelp -- # # This program takes an ftool name and searches the FTools help # directory for the corresponding help file # # # $Id: fparhelp,v 3.4 1997/05/22 19:56:12 elwin Exp $ # # Larry Brown 9/21/1995 # Hughes STX for GSFC/HEASARC # use Getopt::Std; getopt('e'); if ($opt_h ) { print<) { #look for parameter specific help if ($line =~ /^\.ls\s+(\(|)(\S+)/) { #ok, we may have a parameter, read in its info $currentPar = $2; $parstart{$currentPar}=substr($line,4); $line = ; until ( $line =~ /^\.le/ or eof) { $helpHash{$currentPar} .= $line; $line = ; } } } #loaded and ready to party if ($helpHash{$par}) { print $parstart{$par}; $the_help = $helpHash{$par}; $~ = "PARHELP"; write; } elsif ($errorFlag == 0) { exit(0); } elsif ($errorFlag == 1) { die "Can't find information about parameter $par for ftool $ftool.\n"; } elsif (-e "$ftool.txt") { system("cat $ftool.txt"); } else { die "Can't find help on $ftool\n"; } } elsif (-e "$ftool.txt" ) { if ($errorFlag == -1) { system("cat $ftool.txt"); } else { die "Cannot find IRAF help file for ftool $ftool\n"; } } else { die "Cannot find any help for $ftool\n"; } format PARHELP = ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~ $the_help .