Meta

 view release on metacpan or  search on metacpan

Meta/Projects/Develop/develop_rc.pl  view on Meta::CPAN

	$env->insert($varx,$mini);
}

sub develop_envx_addx_mult($$$$$$) {
	my($varx,$sepa,$list,$suff,$star,$env)=@_;
	my(@vals)=split($sepa,$list);
	my(@resu);
	for(my($i)=0;$i<=$#vals;$i++) {
		push(@resu,$vals[$i].$suff);
	}
	my($resx)=join($sepa,@resu);
	develop_envx_addx($varx,$sepa,$resx,$star,$env);
}

sub develop_scri_addx($$) {
	my($list,$para)=@_;
	push(@$list,$para);
}

my($aegi,$tvbi,$tvld,$tvma,$tvin,$xmli,$sgmi,$sgpi,$bplt,$dplt,$shel,$tbin,$tldx,$tman,$tinf);
my($txml,$tsgm,$tsgp,$tsgs,$binx,$ldxx,$manx,$info,$java,$perl,$txmd,$sgml,$sgpl,$pyth,$base);
my($cdpa,$cdch,$colo,$lsco,$long,$pete,$nprj,$nchn,$blxx,$chxx,$ps1x,$page,$manp,$prof,$verb);
my($opts)=Meta::Utils::Opts::Opts->new();
$opts->set_standard();
$opts->def_dire("aegi","where is your aegis located","/local/tools/bin",\$aegi);
$opts->def_path("tvbi","extra path for the shell runner","/usr/games:/usr/sbin:/local/tools/bin",\$tvbi);
$opts->def_path("tvld","extra path for the dynamic linkder","/local/tools/lib",\$tvld);
$opts->def_path("tvma","extra path for the man pager","/local/tools/man",\$tvma);
$opts->def_path("tvin","extra path for the info pager","/local/tools/info",\$tvin);
$opts->def_flst("xmli","extra path for the XML catalogs","",\$xmli);
$opts->def_flst("sgmi","extra path for the SGML catalogs","",\$sgmi);
$opts->def_path("sgpi","extra path for the sgml path","",\$sgpi);
$opts->def_stri("bplt","what is the binary platform you are working on","reg.cpp.bin.dbg",\$bplt);
$opts->def_stri("dplt","what is the dll platform you are working on","reg.cpp.dll.dbg",\$dplt);
$opts->def_stri("shel","what is your shell","bash2",\$shel);
$opts->def_bool("tbin","do you want to set PATH for tools",0,\$tbin);
$opts->def_bool("tldx","do you want to set LD_LIBRARY_PATH for tools",0,\$tldx);
$opts->def_bool("tman","do you want to set MANPATH for tools",1,\$tman);
$opts->def_bool("tinf","do you want to set INFOPATH for tools",1,\$tinf);
$opts->def_bool("txml","do you want to set XML_CATALOG_FILES for tools",0,\$txml);
$opts->def_bool("tsgm","do you want to set SGML_CATALOG_FILES for tools",0,\$tsgm);
$opts->def_bool("tsgp","do you want to set SGML_SEARCH_PATH for tools",0,\$tsgp);
$opts->def_bool("tsgs","do you want to set SGML_PATH for tools",0,\$tsgs);
$opts->def_bool("binx","do you want to set PATH for tools",1,\$binx);
$opts->def_bool("ldxx","do you want to set LD_LIBRARY_PATH for tools",1,\$ldxx);
$opts->def_bool("manx","do you want to set MANPATH for tools",0,\$manx);
$opts->def_bool("info","do you want to set INFOPATH for tools",0,\$info);
$opts->def_bool("java","do you want to set CLASSPATH for tools",1,\$java);
$opts->def_bool("perl","do you want to set PERL5LIB for tools",0,\$perl);
$opts->def_bool("txmd","do you want to set XML_CATALOG_FILES for tools",0,\$txmd);
$opts->def_bool("sgml","do you want to set SGML_CATALOG_FILES for tools",0,\$sgml);
$opts->def_bool("sgpl","do you want to set SGML_SEARCH_PATH for tools",0,\$sgpl);
$opts->def_bool("pyth","do you want to set PYTHONPATH for tools",1,\$pyth);
$opts->def_bool("base","do you want perl baseline executables settings (this is for libs and bins)",1,\$base);
$opts->def_bool("cdpa","do you want to set the CDPATH for development",1,\$cdpa);
$opts->def_bool("cdch","do you want to cd to your change on login",1,\$cdch);
$opts->def_bool("colo","do you want ls baseline coloring",0,\$colo);
$opts->def_bool("lsco","do you want ls standard coloring",0,\$lsco);
$opts->def_bool("long","do you want --long opt for ls coloring",1,\$long);
$opts->def_bool("pete","do you want aegis type (Peter) shortcuts (only valid for bash)",0,\$pete);
$opts->def_bool("nprj","do you want to set your AEGIS_PROJECT from your aegis prefs",1,\$nprj);
$opts->def_bool("nchn","do you want to set your AEGIS_CHANGE from your aegis prefs",1,\$nchn);
$opts->def_bool("blxx","do you want to set the BL environment variable to point to the baseline",1,\$blxx);
$opts->def_bool("chxx","do you want to set the CH environment variable to point to the change",1,\$chxx);
$opts->def_bool("ps1x","do you want to set the PS1 environment variable for the shell",1,\$ps1x);
$opts->def_bool("page","do you want to set the PAGER environment varialbe",1,\$page);
$opts->def_bool("manp","do you want to set the MANPAGER variable",1,\$manp);
$opts->def_file("prof","where is your aegis profile located","/local/tools/share/aegis/profile",\$prof);
$opts->def_bool("verb","do you want verbosity",0,\$verb);
$opts->set_free_allo(0);
$opts->analyze(\@ARGV);

# prepare the environment hash

my($env)=Meta::Ds::Ohash->new();

# read the project hash table

my($hash)=Meta::Baseline::Aegis::rc_set();

# Lets get the change directory,baseline directory and search path
# from the aesub program

my($aegi_proj)=Meta::Baseline::Aegis::project();
my($aegi_chan)=Meta::Baseline::Aegis::change();
my($aegi_base)=Meta::Baseline::Aegis::baseline();
my($aegi_stat)=Meta::Baseline::Aegis::state();
my($aegi_sear)=Meta::Baseline::Aegis::search_path();
my($aegi_inch)=Meta::Baseline::Aegis::inside_change();
my($aegi_change_dir)=Meta::Baseline::Aegis::work_dir();
my($aegi_baseline_dir)=Meta::Baseline::Aegis::baseline();

# Lets declare the script variable to hold the script

my(@scri);

# Lets give MANPATH its own value so we could (potentially) change it

my($mpth)=Meta::Utils::System::system_out("man",["--path"]);
$env->insert("MANPATH",$$mpth);
$env->insert("INFOPATH","/usr/share/info");

# Lets start handling of the options.

if($binx) {
	develop_envx_addx_mult("PATH",":",$aegi_sear,"/bins/".$bplt,1,$env);
}
if($ldxx) {
	develop_envx_addx_mult("LD_LIBRARY_PATH",":",$aegi_sear,"/dlls/".$dplt,1,$env);
}
if($manx) {
	develop_envx_addx_mult("MANPATH",":",$aegi_sear,"/manx",1,$env);
}
if($info) {
	develop_envx_addx_mult("INFOPATH",":",$aegi_sear,"/info",1,$env);
}
if($java) {
	develop_envx_addx_mult("CLASSPATH",":",$aegi_sear,"/objs/java/lib",1,$env);
}
if($perl) {
	develop_envx_addx_mult("PERL5LIB",":",$aegi_sear,"/perl/lib",1,$env);
}

Meta/Projects/Develop/develop_rc.pl  view on Meta::CPAN

do you want to set MANPATH for tools

=item B<info> (type: bool, default: 0)

do you want to set INFOPATH for tools

=item B<java> (type: bool, default: 1)

do you want to set CLASSPATH for tools

=item B<perl> (type: bool, default: 0)

do you want to set PERL5LIB for tools

=item B<txmd> (type: bool, default: 0)

do you want to set XML_CATALOG_FILES for tools

=item B<sgml> (type: bool, default: 0)

do you want to set SGML_CATALOG_FILES for tools

=item B<sgpl> (type: bool, default: 0)

do you want to set SGML_SEARCH_PATH for tools

=item B<pyth> (type: bool, default: 1)

do you want to set PYTHONPATH for tools

=item B<base> (type: bool, default: 1)

do you want perl baseline executables settings (this is for libs and bins)

=item B<cdpa> (type: bool, default: 1)

do you want to set the CDPATH for development

=item B<cdch> (type: bool, default: 1)

do you want to cd to your change on login

=item B<colo> (type: bool, default: 0)

do you want ls baseline coloring

=item B<lsco> (type: bool, default: 0)

do you want ls standard coloring

=item B<long> (type: bool, default: 1)

do you want --long opt for ls coloring

=item B<pete> (type: bool, default: 0)

do you want aegis type (Peter) shortcuts (only valid for bash)

=item B<nprj> (type: bool, default: 1)

do you want to set your AEGIS_PROJECT from your aegis prefs

=item B<nchn> (type: bool, default: 1)

do you want to set your AEGIS_CHANGE from your aegis prefs

=item B<blxx> (type: bool, default: 1)

do you want to set the BL environment variable to point to the baseline

=item B<chxx> (type: bool, default: 1)

do you want to set the CH environment variable to point to the change

=item B<ps1x> (type: bool, default: 1)

do you want to set the PS1 environment variable for the shell

=item B<page> (type: bool, default: 1)

do you want to set the PAGER environment varialbe

=item B<manp> (type: bool, default: 1)

do you want to set the MANPAGER variable

=item B<prof> (type: file, default: /local/tools/share/aegis/profile)

where is your aegis profile located

=item B<verb> (type: bool, default: 0)

do you want verbosity

=back

no free arguments are allowed

=head1 BUGS

None.

=head1 AUTHOR

	Name: Mark Veltzer
	Email: mailto:veltzer@cpan.org
	WWW: http://www.veltzer.org
	CPAN id: VELTZER

=head1 HISTORY

	0.00 MV move tests to modules
	0.01 MV finish papers
	0.02 MV md5 issues

=head1 SEE ALSO

Error(3), File::Basename(3), Meta::Baseline::Aegis(3), Meta::Ds::Ohash(3), Meta::Utils::File::File(3), Meta::Utils::Opts::Opts(3), Meta::Utils::Output(3), Meta::Utils::System(3), POSIX(3), strict(3)

=head1 TODO

-get the $- variable from the shell as input (the shell has it) and use it to make checks whether this script runs interactivly or not...

-make routine in here more accessible in that users could change their platform / architecture in the middle of a shell session.



( run in 1.977 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )