source: trunk/locker/deploy/bin/gallery2

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