mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
Add perl versions of scripts.
This commit is contained in:
parent
dc1b711e19
commit
bfade85578
2 changed files with 91 additions and 0 deletions
71
releng/org.eclipse.rse.build/build.pl
Normal file
71
releng/org.eclipse.rse.build/build.pl
Normal file
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Build script for Remote System Explorer
|
||||
# Authors: Dave Dykstal, Kushal Munir
|
||||
# java and cvs have to be in the path
|
||||
|
||||
use warnings;
|
||||
use File::Spec;
|
||||
|
||||
sub ask($$) {
|
||||
my ($question, $default, $message, $ans);
|
||||
($question, $default) = @_;
|
||||
$message = "${question} (default is ${default}): ";
|
||||
print STDERR $message;
|
||||
$ans = <STDIN>;
|
||||
chomp $ans;
|
||||
$ans = $ans ? $ans : $default;
|
||||
return $ans;
|
||||
}
|
||||
|
||||
# $eclipse is the location of the basic PDE and plugins to compile against
|
||||
# This should include the org.eclipse.pde.build project
|
||||
$eclipse = "../eclipse";
|
||||
|
||||
# $builder is the location of the custom build scripts customTargets.xml and build.properties
|
||||
# (i.e. the contents of org.eclipse.rse.build)
|
||||
$builder = ".";
|
||||
|
||||
# $working is where the build is actually done, does not need to exist
|
||||
$working = "../working";
|
||||
|
||||
$plugins = File::Spec->catdir($eclipse, "plugins");
|
||||
$baseBuilderGlob = File::Spec->catdir($plugins, "org.eclipse.pde.build*");
|
||||
|
||||
# Find the base build scripts: genericTargets.xml and build.xml
|
||||
@candidates = glob($baseBuilderGlob);
|
||||
$n = @candidates;
|
||||
if ($n == 0) {
|
||||
die("PDE Build was not found.");
|
||||
}
|
||||
if ($n > 1) {
|
||||
die("Too many versions of PDE Build were found.");
|
||||
}
|
||||
$baseBuilder = $candidates[0];
|
||||
|
||||
$buildDirectory = "$working/build";
|
||||
$packageDirectory = "$working/package";
|
||||
$publishDirectory = "$working/publish";
|
||||
|
||||
$tag = ask("Enter tag to fetch from CVS", "HEAD");
|
||||
$buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration)", "P");
|
||||
($sec, $minute, $hour, $mday, $mon, $year) = gmtime();
|
||||
$timeStamp = sprintf("%4.4d%2.2d%2.2d%2.2d%2.2d", $year + 1900, ($mon + 1), ($mday + 1), $hour, $minute, $sec);
|
||||
$buildId = $buildType . $timeStamp;
|
||||
$buildId = ask("Enter the build id", $buildType . $timeStamp);
|
||||
|
||||
$incantation = "java -cp ${eclipse}/startup.jar org.eclipse.core.launcher.Main ";
|
||||
$incantation .= "-application org.eclipse.ant.core.antRunner ";
|
||||
$incantation .= "-buildfile ${baseBuilder}/scripts/build.xml ";
|
||||
$incantation .= "-DbuildDirectory=${buildDirectory} ";
|
||||
$incantation .= "-DpackageDirectory=${packageDirectory} ";
|
||||
$incantation .= "-DpublishDirectory=${publishDirectory} ";
|
||||
$incantation .= "-Dbuilder=${builder} ";
|
||||
$incantation .= "-DbaseLocation=${eclipse} ";
|
||||
$incantation .= "-DbuildType=${buildType} ";
|
||||
$incantation .= "-DbuildId=${buildId} ";
|
||||
$incantation .= "-DmapVersionTag=${tag} ";
|
||||
|
||||
print($incantation);
|
||||
|
||||
#system($incantation);
|
20
releng/org.eclipse.rse.build/fetchBuilder.pl
Executable file
20
releng/org.eclipse.rse.build/fetchBuilder.pl
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/perl
|
||||
use warnings;
|
||||
|
||||
print STDERR "Which tag do you want to fetch? (default is HEAD): ";
|
||||
$answer = <STDIN>;
|
||||
chomp($answer);
|
||||
$tag = $answer ? $answer : "HEAD";
|
||||
|
||||
$incantation = "cvs ";
|
||||
$incantation .= "-d :pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp ";
|
||||
$incantation .= "checkout ";
|
||||
$incantation .= "-r ${tag} ";
|
||||
$incantation .= "-d builder ";
|
||||
$incantation .= "org.eclipse.tm.rse/releng/org.eclipse.rse.build ";
|
||||
|
||||
print($incantation);
|
||||
#system($incantation);
|
||||
|
||||
print("\n");
|
||||
print("Builder has been fetched and is in the builder subdirectory\n");
|
Loading…
Add table
Reference in a new issue