From 01dcc09a78b76b133a7578fbf3c144d15938de0d Mon Sep 17 00:00:00 2001 From: comp500 Date: Thu, 1 Sep 2022 02:44:12 +0100 Subject: [PATCH] Add main method so link.infra.packwiz.installer.Main can be launched directly Useful for scripts or tools that already handle automatic updates of packwiz-installer, such as docker-minecraft-server :) Adds a message to suggest using the bootstrapper for automatic updates --- src/main/kotlin/link/infra/packwiz/installer/Main.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/link/infra/packwiz/installer/Main.kt b/src/main/kotlin/link/infra/packwiz/installer/Main.kt index 096874c..a243252 100644 --- a/src/main/kotlin/link/infra/packwiz/installer/Main.kt +++ b/src/main/kotlin/link/infra/packwiz/installer/Main.kt @@ -135,6 +135,12 @@ class Main(args: Array) { options.addOption("g", "no-gui", false, "Don't display a GUI to show update progress") options.addOption("h", "help", false, "Display this message") // Implemented in packwiz-installer-bootstrap! } + + @JvmStatic + fun main(args: Array) { + Log.info("packwiz-installer was started without packwiz-installer-bootstrap. Use the bootstrapper for automatic updates! (Disregard this message if you have your own update mechanism)") + Main(args) + } } // Actual main() is in RequiresBootstrap!