source: trunk/locker/deploy/bin/gallery2 @ 1919

Last change on this file since 1919 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
Line 
1#!/usr/bin/perl
2use strict;
3use FindBin qw($Bin);
4use lib $Bin;
5use onserver_star;
6use File::Path
7
8setup();
9
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);
16
17system("patch", "install/steps/AuthenticateStep.class",
18       "/mit/scripts/deploy$scriptsdev/gallery2.patch");
19
20$ua->cookie_jar({file => '.cookies'});
21
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}, {});
27
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);
33
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);
46
47fetch_uri('install/index.php', {step => 6},
48          {adminName => $admin_username,
49           passwordA => $admin_password,
50           action => 'create',
51           passwordB => $admin_password,
52           email => $email,
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}, {});
61
62unlink '.cookies';
Note: See TracBrowser for help on using the repository browser.