[Bio] / FigCommon / tool_hdr_py.pl Repository:
ViewVC logotype

View of /FigCommon/tool_hdr_py.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Wed Mar 31 17:04:46 2004 UTC (16 years, 3 months ago) by olson
Branch: MAIN
CVS Tags: merge-trunktag-bobdev_news-2, Root-bobdev_news, merge-bobdev_news-1, merge-trunktag-bobdev_news-1, merge-bodev_news-3, lwc, caBIG-00-00-00, merge-bobdev_news-2, merge-trunktag-bodev_news-3
Branch point for: Branch-bobdev_news
Added build_cgi script.
Moved tool_hdr scripts here.

#
# Create a new fig script.
#

open(FH, "<$FIG_Config::fig_disk/config/fig-user-env.sh");
while (<FH>)
{
    chomp;
    if (/^RTARCH=\"(.*)\"/)
    {
	$arch = $1;
	last;
    }
}

if (!$arch)
{
    die "Couldn't determine FIG architecture name\n";
}

$file = "$FIG_Config::fig_disk/dist/releases/current/$arch/tool_hdr_py";

open(FH, "<$file") or die "Cannot open tool_hdr_py file $file: $!\n";

if (@ARGV == 0)
{
    while (<FH>)
    {
	print;
    }
    close(FH);
}
else
{
    $out = $ARGV[0];
    open(OUT, ">$out") or die "Cannot open output $out: $!\n";
    while (<FH>)
    {
	print OUT $_;
    }
    close(FH);
    close(OUT);
    system("chmod +x $out");
}



MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3