#!/usr/bin/perl
#*******************************************************************************#
# #
# setEnvironment: this file should be possible to include in bash AND makefile #
# #
#*******************************************************************************#
#***************************************************************************************************
# *
# Copyright (C) 2003, 2004 Joerg Kunze *
# *
# This file is part of siliconBrain. *
# *
# siliconBrain is free software; you can redistribute it and/or modify *
# it under the terms of the GNU General Public License as published by *
# the Free Software Foundation; either version 2 of the License, or *
# (at your option) any later version. *
# *
# siliconBrain is distributed in the hope that it will be useful, *
# but WITHOUT ANY WARRANTY; without even the implied warranty of *
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# GNU General Public License for more details. *
# *
# You should have received a copy of the GNU General Public License *
# along with this program; if not, write to the Free Software *
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
# *
#***************************************************************************************************
$siliconBrainRelease = '$siliconBrainRelease: 0.2.3 $';
$siliconBrainRcsIdentifier = '$Id: setEnvironment.perl,v 1.13 2004/12/14 23:31:26 joerg Exp $';
$siliconBrainSaveStamp = '$siliconBrainSaveStamp: 2004/12/14 22:26:50, Joerg Kunze$';
$siliconBrainPackageName = $ENV{ "siliconBrainPackageName" };
print
"#********************************** -*-Shell-script-*- *************************#
# #
# setEnvironment: this file should be possible to include in bash AND makefile #
# #
#*******************************************************************************#
";
system( "formatHeader",
"#",
"$siliconBrainRelease",
"$siliconBrainRcsIdentifier",
"$siliconBrainSaveStamp",
"set the environment to use this package",
"$siliconBrainRelease",
"$siliconBrainRcsIdentifier",
"$siliconBrainSaveStamp"
);
#---------------------------------------------------------------------#
# INFOPATH: #
#---------------------------------------------------------------------#
($infoPath) = grep !/^$/, `emacs -batch --eval="(print Info-default-directory-list)" 2> /dev/null`;
chomp $infoPath;
$infoPath =~ s/^\(\"|\"\)$//g;
$infoPath =~ s/\" \"/:/g;
$infoPath = $ENV{"INFOPATH"} . ":$infoPath" if( $ENV{"INFOPATH"} );
#---------------------------------------------------------------------#
# MANPATH: #
#---------------------------------------------------------------------#
$manPath = $ENV{"MANPATH"};
#---------------------------------------------------------------------#
# PERL5LIB: #
#---------------------------------------------------------------------#
$perl5lib = $ENV{"PERL5LIB"};
#---------------------------------------------------------------------#
# print: g #
#---------------------------------------------------------------------#
print
"export PATH=\$${siliconBrainPackageName}Path/programs:\$PATH\n",
"export INFOPATH=\$${siliconBrainPackageName}Path/documentation:$infoPath\n",
"export MANPATH=\$${siliconBrainPackageName}Path/documentation:$manPath\n",
"export PERL5LIB=\$${siliconBrainPackageName}Path:$perl5lib\n"
;
# $Log: setEnvironment.perl,v $
# Revision 1.13 2004/12/14 23:31:26 joerg
# published for new release 0.2.3
#
# Revision 1.12 2004/12/14 23:17:05 joerg
# published for new release 0.2.2
#
# Revision 1.11 2004/12/14 22:42:23 joerg
# allFiles: all sources have a Log CVS keyword at the end now.
#