summaryrefslogtreecommitdiffhomepage
path: root/scripts/build.sh
blob: 9b8fa286a78fcad953d30b72c979c12ae111949f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

(
set -e
basedir="$(cd "$1" && pwd -P)"
gitcmd="git -c commit.gpgsign=false"

($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
) || exit 1
if [ "$2" == "--jar" ]; then
    mvn clean install && ./scripts/paperclip.sh "$basedir"
fi
) || exit 1