source: locker/deploy/bin/gallery2 @ 1116

Last change on this file since 1116 was 1116, checked in by mitchb, 15 years ago
Fix Gallery2 autoinstaller. Don't have separate star/non-star versions. The new version, when updated to use *.scripts, was creating ~locker/scripts-gallery2-star directories, and the onserver code was expecting to write into ~locker/scripts-gallery2. This silently worked for people who had a previous Gallery2 autoinstall, but was broken for anyone else. Good thing I didn't blog about it... totally not as bad as what happened when we advertised Django.
  • Property svn:executable set to *
File size: 1.7 KB
RevLine 
[127]1#!/usr/bin/perl
2use strict;
3use lib '/mit/scripts/deploy/bin';
[1116]4use onserver_star;
[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
[1104]16system("patch", "install/steps/AuthenticateStep.class",
17       "/mit/scripts/deploy$scriptsdev/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,
[476]51           email => $email,
[475]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.