Add don't update flag

This commit is contained in:
md_5 2014-12-12 11:07:46 +11:00
parent 42001db64a
commit a664e1f263

View file

@ -53,13 +53,20 @@ public class Builder
public static final File CWD = new File( "." ); public static final File CWD = new File( "." );
public static final String MC_VERSION = "1.8"; public static final String MC_VERSION = "1.8";
private static final File jacobeDir = new File( "jacobe" ); private static final File jacobeDir = new File( "jacobe" );
private static boolean dontUpdate;
public static void main(String[] args) throws Exception public static void main(String[] args) throws Exception
{ {
for (String s : args) { for ( String s : args )
if ("--disable-certificate-check".equals(s)) { {
if ( "--disable-certificate-check".equals( s ) )
{
disableHttpsCertificateCheck(); disableHttpsCertificateCheck();
} }
if ( "--dont-update".equals( s ) )
{
dontUpdate = true;
}
} }
if ( IS_MAC ) if ( IS_MAC )
{ {
@ -146,10 +153,13 @@ public class Builder
Git spigotGit = Git.open( spigot ); Git spigotGit = Git.open( spigot );
Git buildGit = Git.open( buildData ); Git buildGit = Git.open( buildData );
pull( bukkitGit ); if ( !dontUpdate )
pull( craftBukkitGit ); {
pull( spigotGit ); pull( bukkitGit );
pull( buildGit ); pull( craftBukkitGit );
pull( spigotGit );
pull( buildGit );
}
File vanillaJar = new File( workDir, "minecraft_server." + MC_VERSION + ".jar" ); File vanillaJar = new File( workDir, "minecraft_server." + MC_VERSION + ".jar" );
if ( !vanillaJar.exists() ) if ( !vanillaJar.exists() )