Paper/scripts/paperclip.sh

23 lines
615 B
Bash
Raw Normal View History

2016-04-02 11:55:54 +08:00
#!/usr/bin/env bash
(
set -e
basedir="$(cd "$1" && pwd -P)"
2016-04-02 11:55:54 +08:00
workdir="$basedir/work"
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
paperjar="$basedir/Paper-Server/target/paper-$mcver.jar"
vanillajar="$workdir/Minecraft/$mcver/$mcver.jar"
2016-04-02 11:55:54 +08:00
(
cd "$workdir/Paperclip"
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar"
)
cp "$workdir/Paperclip/assembly/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
2016-04-02 11:55:54 +08:00
echo ""
echo ""
echo ""
echo "Build success!"
echo "Copied final jar to $(cd "$basedir" && pwd -P)/paperclip.jar"
) || exit 1