Changeset 475 for locker


Ignore:
Timestamp:
Oct 14, 2007, 5:07:14 PM (17 years ago)
Author:
andersk
Message:
Uncurl gallery2.
Location:
locker/deploy/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • locker/deploy/bin/gallery2

    r127 r475  
    33use lib '/mit/scripts/deploy/bin';
    44use onserver;
     5use File::Path
    56
    67setup();
    78
    8 `rm -rf $HOME/scripts-gallery2/$sqldb`;
    9 `mkdir -p $HOME/scripts-gallery2/$sqldb`;
     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);
    1015
    11 `patch install/steps/AuthenticateStep.class /mit/scripts/deploy/gallery2.patch`;
     16system('patch', 'install/steps/AuthenticateStep.class',
     17       '/mit/scripts/deploy/gallery2.patch');
    1218
    13 `curl -c .cookies http://scripts.mit.edu/~$USER/$addrend/install/index.php 2>/dev/null`;
    14 `curl -b .cookies -d "language=en_US" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=1 2>/dev/null`;
    15 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=2 2>/dev/null`;
    16 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=3 2>/dev/null`;
    17 `curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`;
    18 `curl -b .cookies -d "isMultisite=0&dir=/mit/$USER/scripts-gallery2/$sqldbcurl&action=save" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=4 2>/dev/null`;
     19$ua->cookie_jar({file => '.cookies'});
    1920
    20 totmp("-d \"type=mysql&hostname=$sqlhost&action=save&confirmReuseTables=&confirmCleanInstall=&username=$sqluser&password=$sqlpass&database=$sqldbcurl&tablePrefix=g2_&columnPrefix=g_\"");
     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}, {});
    2126
    22 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`;
    23 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=5 2>/dev/null`;
     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);
    2432
    25 totmp("-d \"adminName=$admin_username&passwordA=$admin_password&action=create&passwordB=$admin_password&email=$human\@mit.edu&fullName=$USER\"");
     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);
    2645
    27 `curl -b .cookies -K $tmp http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=6 2>/dev/null`;
    28 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=7 2>/dev/null`;
    29 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=8 2>/dev/null`;
    30 `curl -b .cookies -d "module[imagemagick]=on&activate=1" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=9 2>/dev/null`;
    31 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=10 2>/dev/null`;
    32 `curl -b .cookies -d "" http://scripts.mit.edu/~$USER/$addrend/install/index.php?step=11 2>/dev/null`;
     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}, {});
    3360
    34 unlink ".cookies";
     61unlink '.cookies';
  • locker/deploy/bin/onserver.pm

    r472 r475  
    2525
    2626$ua = LWP::UserAgent->new;
     27push @{$ua->requests_redirectable}, 'POST';
    2728
    2829sub fetch_uri {
Note: See TracChangeset for help on using the changeset viewer.