![]() ![]() |
![]() |
File: [Development] / JSOC / Attic / getmachtype.pl
(download)
Revision: 1.1, Wed Oct 14 16:07:41 2009 UTC (13 years, 7 months ago) by arta Branch: MAIN CVS Tags: Ver_LATEST, Ver_DRMSLATEST, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2, Ver_6-1, Ver_6-0, Ver_5-9, Ver_5-8, Ver_5-7, Ver_5-6, Ver_5-14, Ver_5-13, Ver_5-12, Ver_5-11, Ver_5-10, NetDRMS_Ver_LATEST, NetDRMS_Ver_9-9, NetDRMS_Ver_8-1, NetDRMS_Ver_8-0, NetDRMS_Ver_7-1, NetDRMS_Ver_7-0, NetDRMS_Ver_6-4, NetDRMS_Ver_6-3, NetDRMS_Ver_6-2, NetDRMS_Ver_6-1, NetDRMS_Ver_6-0, NetDRMS_Ver_2-7, NetDRMS_Ver_2-6, NetDRMS_Ver_2-5, NetDRMS_Ver_2-4, NetDRMS_Ver_2-3, NetDRMS_Ver_2-2, NetDRMS_Ver_2-1, NetDRMS_Ver_2-0 Move machine-type-guessing code from moreconfigure.pl (which implies that youd have to run configure everytime you want to build on a new machine) to a script, getmachinetype.pl, which is then called directly for make. This is used to get the default third-party-lib locations |
#!/usr/bin/perl -w use Sys::Hostname; my($hostname); my($machtype); # first figure out what type of Stanford machine this script is running on $hostname = hostname(); if ($hostname =~ /j1/) { $machtype = "j1"; } elsif ($hostname =~ /d02/) { $machtype = "d02"; } elsif ($hostname =~ /hmidb/) { $machtype = "dbserver"; } elsif ($hostname =~ /cl1n0/) { $machtype = "cluster"; } elsif ($hostname =~ /dcs/) { $machtype = "dcs"; } if (defined($machtype)) { print STDOUT $machtype; }
Karen Tian |
Powered by ViewCVS 0.9.4 |