source: locker/deploy/bin/gallery2 @ 475

Last change on this file since 475 was 475, checked in by andersk, 16 years ago
Uncurl gallery2.
  • Property svn:executable set to *
File size: 1.7 KB
RevLine 
[127]1#!/usr/bin/perl
2use strict;
3use lib '/mit/scripts/deploy/bin';
4use onserver;
[475]5use File::Path
[127]6
7setup();
8
[475]9my $dir = "/mit/$USER/scripts-gallery2/$sqldb";
10if (-e $dir) {
11    print STDERR "ERROR: The directory $dir already exists.\nTry selecting a different name.";
12    exit 1;
13}
14mkpath($dir);
[127]15
[475]16system('patch', 'install/steps/AuthenticateStep.class',
17       '/mit/scripts/deploy/gallery2.patch');
[127]18
[475]19$ua->cookie_jar({file => '.cookies'});
[127]20
[475]21fetch_uri('install/index.php');
22fetch_uri('install/index.php', {step => 1},
23          {language => 'en_US'});
24fetch_uri('install/index.php', {step => 2}, {});
25fetch_uri('install/index.php', {step => 3}, {});
[127]26
[475]27my $post4 = {isMultisite => 0,
28            dir => $dir,
29            action => 'save'};
30fetch_uri('install/index.php', {step => 4}, $post4);
31fetch_uri('install/index.php', {step => 4}, $post4);
[127]32
[475]33my $post5 = {type => 'mysql',
34             hostname => $sqlhost,
35             action => 'save',
36             confirmReuseTables => '',
37             confirmCleanInstall => '',
38             username => $sqluser,
39             password => $sqlpass,
40             database => $sqldb,
41             tablePrefix => 'g2_',
42             columnPrefix => 'g_'};
43fetch_uri('install/index.php', {step => 5}, $post5);
44fetch_uri('install/index.php', {step => 5}, $post5);
[127]45
[475]46fetch_uri('install/index.php', {step => 6},
47          {adminName => $admin_username,
48           passwordA => $admin_password,
49           action => 'create',
50           passwordB => $admin_password,
51           email => "$human\@mit.edu",
52           fullName => $USER});
53fetch_uri('install/index.php', {step => 7}, {});
54fetch_uri('install/index.php', {step => 8}, {});
55fetch_uri('install/index.php', {step => 9},
56          {'module[imagemagick]' => 'on',
57           activate => 1});
58fetch_uri('install/index.php', {step => 10}, {});
59fetch_uri('install/index.php', {step => 11}, {});
[127]60
[475]61unlink '.cookies';
Note: See TracBrowser for help on using the repository browser.