2016-04-02 05:55:54 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-04-03 09:23:19 +02:00
|
|
|
(
|
|
|
|
set -e
|
2016-04-03 10:35:51 +02:00
|
|
|
basedir="$(cd "$1" && pwd -P)"
|
2018-05-24 20:41:50 +02:00
|
|
|
gitcmd="git -c commit.gpgsign=false"
|
2016-04-02 05:55:54 +02:00
|
|
|
|
2018-05-24 20:41:50 +02:00
|
|
|
($gitcmd submodule update --init && ./scripts/remap.sh "$basedir" && ./scripts/decompile.sh "$basedir" && ./scripts/init.sh "$basedir" && ./scripts/applyPatches.sh "$basedir") || (
|
|
|
|
echo "Failed to build Paper"
|
|
|
|
exit 1
|
2016-04-02 05:55:54 +02:00
|
|
|
) || exit 1
|
|
|
|
if [ "$2" == "--jar" ]; then
|
2018-05-24 20:41:50 +02:00
|
|
|
mvn clean install && ./scripts/paperclip.sh "$basedir"
|
2016-04-02 05:55:54 +02:00
|
|
|
fi
|
2016-04-03 09:23:19 +02:00
|
|
|
)
|