#!/usr/bin/perl # use strict; die "Must set \$FBHOME before running this.\n" unless -d $ENV{'FBHOME'}; my $FBHOME = $ENV{'FBHOME'}; my $mode = @ARGV[0]; if ($mode eq "") { chdir $FBHOME or die; system("cvs/wcmtools/bin/multicvs.pl --conf=cvs/fb/cvs/multicvs.conf -c -s") and die "Failed to run multicvs.pl ... do you have the cvs/ dir?\n"; print "done.\n"; exit; } if ($mode eq "makerelease") { chdir $FBHOME or die; my @now = localtime; my $ct = 0; my $file; do { $file = sprintf("htdocs/download/code/fotobilder-%04d%02d%02d%02d.tar.gz", $now[5]+1900, $now[4]+1, $now[3], $ct); $ct++; } while (-e $file); system("tar -zcvf $file cvs/multicvs.conf cvs/bml cvs/wcmtools cvs/fb bootstrap.pl") and die; print "done.\n"; exit; } die "Unknown mode.\n";