From: Tim Pope Date: Thu, 21 Apr 2005 05:13:44 +0000 (+0000) Subject: Ugly ugly hacks to support TAMUK in addition to ACCD X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=commitdiff_plain;h=36b147d74705c795fb884507c3564477eb31e2bb Ugly ugly hacks to support TAMUK in addition to ACCD --- diff --git a/perl/sctweb b/perl/sctweb index 018077c..9aef892 100755 --- a/perl/sctweb +++ b/perl/sctweb @@ -60,8 +60,17 @@ sub US_Labor # First Monday after the first Sunday in September Nth_Weekday_of_Month_Year($year,9,7,1), +1) ); } -if (-r $ENV{HOME} . "/.sctwebrc") { - open CONFIG, $ENV{HOME} . "/.sctwebrc"; +my $config = $ENV{HOME} . "/.sctwebrc"; +if ($ARGV[0] eq '-f') { + shift; + $config = shift; +} + +my $arg = ""; +$arg = shift if (defined($ARGV[0]) && $ARGV[0] =~ /^-\w$/); + +if (-r $config) { + open CONFIG, $config; while() { s/\#.*//; next unless m/^([^=]*)=(.*)/; @@ -83,6 +92,14 @@ $response = $ua->post("$url&tserve_trans_config=astulog.cfg", { tserve_tip_write $response = $ua->get("$url&tserve_tip_write=||WID|SID|PIN|Term&tserve_trans_config=" . ("regterm.cfg"||"rgrdterm.cfg")); # Valid terms die $response->status_line unless $response->is_success; my @terms = grep {s/^