LJSUP-8908: Internal Server Error when non-logged user open friends page
[livejournal.git] / bootstrap.pl
blob19910eb2627b271e97a90fb05b994d94b44f2a91
1 #!/usr/bin/perl
4 use strict;
5 die "Must set \$LJHOME before running this.\n"
6 unless -d $ENV{'LJHOME'};
8 my $LJHOME = $ENV{'LJHOME'};
9 my $mode = @ARGV[0];
11 if ($mode eq "") {
13 chdir $LJHOME or die "Couldn't chdir to \$LJHOME directory.\n";
15 system("cvs/vcv/bin/vcv --conf=cvs/livejournal/cvs/multicvs.conf -c -s")
16 and die "Failed to run vcv ... do you have the cvs/ dir?\n";
18 print "done.\n";
19 exit;
22 if ($mode eq "makerelease") {
23 chdir $LJHOME or die;
24 my $path = $ENV{'RELDIR'};
25 $path .= "/" if $path;
26 my @now = localtime;
27 my $ct = 0;
28 my $file;
29 do {
30 $file = sprintf("${path}livejournal-%04d%02d%02d%02d.tar.gz", $now[5]+1900, $now[4]+1, $now[3], $ct);
31 $ct++;
32 } while (-e $file);
34 system("tar -zcvf $file README.txt bootstrap.pl cvs") and die;
36 print "done.\n";
37 exit;
40 die "Unknown mode.\n";