Changeset 1038 for locker/deploy/bin


Ignore:
Timestamp:
Mar 31, 2009, 7:30:52 PM (13 years ago)
Author:
mitchb
Message:
Fix more of django autoinstaller.  Actually fill in settings.py,
instead of just pretending.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • locker/deploy/bin/django

    r1036 r1038  
    4141
    4242open SETTINGS, "settings.py";
    43 open NEWSETTINGS, "settings.py.new";
     43open NEWSETTINGS, ">settings.py.new";
    4444while (<SETTINGS>) {
    4545  chomp;
    4646  if (/Your Name/) {
    47     $_ = "    ('$USER', '$email'),\n";
     47    $_ = "    ('$USER', '$email'),";
    4848  } elsif (/^DATABASE_ENGINE/) {
    49     $_ = "DATABASE_ENGINE = 'mysql'\n";
     49    $_ = "DATABASE_ENGINE = 'mysql'";
    5050  } elsif  (/^DATABASE_NAME/) {
    51     $_ = "DATABASE_NAME = '$sqldb'\n";
     51    $_ = "DATABASE_NAME = '$sqldb'";
    5252  } elsif (/^DATABASE_USER/) {
    53     $_ = "DATABASE_USER = '$sqluser'\n";
     53    $_ = "DATABASE_USER = '$sqluser'";
    5454  } elsif (/^DATABASE_PASSWORD/) {
    55     $_ = "DATABASE_PASSWORD = '$sqlpass'\n";
     55    $_ = "DATABASE_PASSWORD = '$sqlpass'";
    5656  } elsif (/^DATABASE_HOST/) {
    57     $_ = "DATABASE_HOST = '$sqlhost'\n";
     57    $_ = "DATABASE_HOST = '$sqlhost'";
    5858  } elsif (/Chicago/) {
    5959    $_ =~ s/Chicago/New_York/;
    6060  }
    61   print NEWSETTINGS $_;
     61  print NEWSETTINGS "$_\n";
    6262}
    6363close NEWSETTINGS;
Note: See TracChangeset for help on using the changeset viewer.