Index: /locker/deploy/bin/joomla
===================================================================
--- /locker/deploy/bin/joomla	(revision 695)
+++ /locker/deploy/bin/joomla	(revision 696)
@@ -5,4 +5,6 @@
 use Cwd;
 use File::Path;
+
+$ua->cookie_jar({file => '.cookies'});
 
 setup();
@@ -14,29 +16,84 @@
 
 fetch_uri(
-    'installation/install2.php',
-    {},
-    {DBhostname => $sqlhost,
-     DBuserName => $sqluser,
-     DBpassword => $sqlpass,
-     DBDel => 0,
-     DBname => $sqldb,
-     DBPrefix => 'jos_',
-     DBSample => 1});
+    'installation/index.php',
+    {});
 
 fetch_uri(
-    'installation/install4.php',
+    'installation/index.php',
     {},
-    {DBhostname => $sqlhost,
-     DBuserName => $sqluser,
-     DBpassword => $sqlpass,
-     DBname => $sqldb,
-     DBPrefix => 'jos_',
-     sitename => $title,
-     siteUrl => $base_uri,
-     absolutePath => getcwd(),
-     adminEmail => $email,
-     adminPassword => $admin_password,
-     filePerms => 0,
-     dirPerms => 0});
+    {"vars[lang]" => "en-GB", 
+     task => "preinstall"});
 
-rmtree('installation');
+fetch_uri(
+    'installation/index.php',
+    {},
+    {task => "license"});
+
+fetch_uri(
+    'installation/index.php',
+    {},
+    {task => "dbconfig"});
+
+fetch_uri(
+    'installation/index.php',
+    {},
+     {"vars[DBtype]" => "mysql",
+      "vars[DBhostname]" => $sqlhost,
+      "vars[DBuserName]" => $sqluser,
+      "vars[DBpassword]" => $sqlpass,
+      "vars[DBname]" => $sqldb,
+      "vars[DBOld]" => "rm",
+      "vars[DBPrefix]" => "jos_",
+      "vars[lang]" => "en-GB",
+      "vars[ftpEnable]" => 0,
+      task => "makedb"});
+
+fetch_uri(
+    'installation/index.php',
+    {},
+     {"vars[ftpEnable]" => 0,
+      "vars[ftpUser]" => "",
+      "vars[ftpPassword]" => "",
+      "vars[ftpRoot]" => "",
+      "vars[ftpHost]" => "",
+      "vars[ftpPort]" => "",
+      "vars[ftpSavePass]" => 0,
+      lang => "en-GB",
+      task => "mainconfig"});
+
+fetch_uri(
+    'installation/index.php',
+    {},
+    {"vars[siteName]" => 'OHAI',
+      "vars[adminEmail]" => $email,
+      "vars[adminPassword]" => $admin_password,
+      "vars[confirmAdminPassowrd]" => $admin_password,
+      #"instDefault" => "Install Sample Data",
+      "vars[oldPrefix]" => "",
+      "vars[srcEncoding]" => "",
+      sqlFile => "",
+      sqlUploaded => "",
+      migration => "",
+      sqlupload => 0,
+      migrationupload => 0,
+      loadchecked => 0,
+      dataLoaded => "",
+      DBtype => "mysql",
+      DBhostname => $sqlhost,
+      DBuserName => $sqluser,
+      DBpassword => $sqlpass,
+      DBname => $sqldb,
+      DBPrefix => "jos_",
+      ftpRoot => "", 
+      ftpEnable => 0,
+      ftpHost => 127.0.0.1,
+      ftpPort => 21, 
+      ftpUser => "", 
+      ftpPassword => "", 
+      lang => "en-GB",
+      migstatus => "",
+     task => "saveconfig"});
+
+`mv installation installation-old`;
+
+exit 0;
Index: /locker/deploy/bin/trac
===================================================================
--- /locker/deploy/bin/trac	(revision 696)
+++ /locker/deploy/bin/trac	(revision 696)
@@ -0,0 +1,48 @@
+#!/usr/bin/perl
+use strict;
+use lib '/mit/scripts/deploy/bin';
+use onserver;
+use Cwd;
+use File::Path;
+use URI::Escape;
+
+setup();
+
+print "\nEnter the name of your project (the title of this Trac instance).\n";
+print "Project name: ";
+my $name=<STDIN>;
+chomp($name);
+
+my $dbstring = "mysql://" . uri_escape($sqluser) . ":" . uri_escape($sqlpass) . "\@$sqlhost/$sqldb";
+
+print "\nEnter the type of version-control repository this project uses.\n";
+print "You'll have to set up the repo yourself; feel free to ask scripts@ for help.\n";
+print "If you don't want version-control integration, take the default.\n";
+print "Repository type (default svn; also bzr, git, hg): ";
+my $repotype=<STDIN>;
+chomp($repotype);
+$repotype = $repotype ? $repotype : 'svn';
+
+print "\nEnter the path to the version-control repository.\n";
+print "If you don't want version-control integration, leave blank.\n";
+print "Path to repository: ";
+my $repopath=<STDIN>;
+chomp($repopath);
+
+print STDERR "running trac-admin:\n";
+system(qw(/usr/bin/trac-admin tracdata initenv),
+       $name, $dbstring, $repotype, $repopath, '/usr/share/trac/templates');
+# XXX this exposes the SQL password on the command line
+
+#aka perl -pe 's/\@ADDREND\@/$addrend/g' <.htaccess.in >.htaccess
+open IN, '<.htaccess.in'; open OUT, '>.htaccess';
+while (<IN>) {
+    s/\@ADDREND\@/$addrend/g;
+    print OUT $_;
+}
+close IN; close OUT;
+
+chmod 0777, '.htaccess';
+unlink '.htaccess.in';
+
+exit 0;
