commit ea370bd9603a125c7decbd1b69e44fa32f850773 parent 68f6a2d7a131343948fd853a60e40aa742ae3058 Author: typable <typable.dev@gmail.com> Date: Sat, 14 Nov 2020 13:29:13 +0100 Added Jar buildscript Diffstat:
A | build.sh | | | 31 | +++++++++++++++++++++++++++++++ |
1 file changed, 31 insertions(+), 0 deletions(-)
diff --git a/build.sh b/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +path=$(pwd) + +if [[ ! -z $1 ]]; then + if [ $1 = "--path" ]; then + if [[ -z $2 ]]; then + echo "Invalid arguments '--path <directory>'!" + exit 0 + fi + path=$2 + fi +fi + +if [ ! -d $path ]; then + echo "Unable to find directory '$path'!" + exit 0 +fi + +if [ ! -f "$(pwd)/plugin.yml" ]; then + echo "Unable to find plugin.yml in '$(pwd)'!" + exit 0 +fi + +jar cf "$path/MinecraftHub.jar" plugin.yml lib/* -C bin . +if [ $? = "0" ]; then + echo "Successfully compile into $path/MinecraftHub.jar" +else + echo "Build failed!" +fi +\ No newline at end of file