mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 02:55:27 +01:00
6866737d61
Also added a few more commands and a new script.
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SCRIPT HEADER start
|
|
basedir=$1
|
|
source "$basedir/scripts/functions.sh"
|
|
echo " "
|
|
echo "----------------------------------------"
|
|
echo " $(bashcolor 1 32)Task$(bashcolorend) - Install Launcher"
|
|
echo " This will build a launcher that similar to Paperclip by the server jar."
|
|
echo " "
|
|
echo "----------------------------------------"
|
|
# SCRIPT HEADER end
|
|
|
|
# Copied from https://github.com/PaperMC/Paper/blob/d54ce6c17fb7a35238d6b9f734d30a4289886773/scripts/paperclip.sh
|
|
# License from Paper applies to this file
|
|
|
|
set -e
|
|
paperworkdir="$basedir/Tuinity/Paper/work"
|
|
mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
|
serverjar="$basedir/Yatopia-Server/target/yatopia-$mcver.jar"
|
|
vanillajar="$paperworkdir/Minecraft/$mcver/$mcver.jar"
|
|
|
|
(
|
|
cd "$paperworkdir/Paperclip"
|
|
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$serverjar" "-Dvanillajar=$vanillajar"
|
|
)
|
|
mkdir -p "$basedir/target"
|
|
cp "$paperworkdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/yatopia-${mcver}-paperclip.jar"
|
|
|
|
echo ""
|
|
echo " $(bashcolor 1 32)Success$(bashcolorend) - Saved launcher jar to target/yatopia-${mcver}-launcher.jar"
|