Last active
August 29, 2015 14:27
-
-
Save justincc/4dcf50a8171a4dc13866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
#use Getopt::Long; | |
#my %opts = {}; | |
if (@ARGV < 1) | |
{ | |
print "Usage: $0 <release-name>\n"; | |
print "For example, $0 opensim-0.7.3-rc2\n"; | |
die; | |
} | |
my $compressedFileExtension = ($^O eq "cygwin") ? "zip" : "tar.gz"; | |
my $releaseName = $ARGV[0]; | |
my $releaseSourceName = "$releaseName-source"; | |
my $releaseSourceTarName = "$releaseSourceName.$compressedFileExtension"; | |
my $releaseTarName = "$releaseName.tar.gz"; | |
print "Using release name $releaseName\n"; | |
execCmd("wget http://dist.opensimulator.org/$releaseSourceTarName"); | |
if ($^O eq "cygwin") | |
{ | |
execCmd("unzip $releaseSourceTarName"); | |
} | |
else | |
{ | |
execCmd("tar xf $releaseSourceTarName"); | |
} | |
chdir($releaseSourceName); | |
if ($^O eq "cygwin") | |
{ | |
execCmd("./runprebuild.bat"); | |
} | |
else | |
{ | |
execCmd("./runprebuild.sh"); | |
# execCmd("nant -t:mono-2.0 build-release"); | |
execCmd("nant build-release"); | |
execCmd("nant distbin"); | |
execCmd("mv distbin ../$releaseName"); | |
chdir(".."); | |
execCmd("tar czf $releaseTarName $releaseName"); | |
execCmd("rm -r $releaseName"); | |
execCmd("tar xf $releaseTarName"); | |
chdir("$releaseName/bin"); | |
execCmd("mono OpenSim.exe"); | |
} | |
sub execCmd | |
{ | |
my $cmd = $_[0]; | |
print "Excecuting command $cmd\n"; | |
system ($cmd) && die; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment