-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
34 lines (32 loc) · 1.1 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# SCRIPT: Building Unity targets using the MultiTarget Builder tool.
# AUTHOR: Valdemar Lindberg
# DATE: 25/05/2020
# REV: 1.0
#
# PLATFORM: Not platform dependent.
#
# PURPOSE:# Creating Unity builds from the command line without
# using the GUI interface.
#
# set -n
# Uncomment to check script syntax, without execution.
#
# set -x
# Uncomment to debug this shell script
#
# Example: ./build.sh /path/unity/Editor/Unity /path/project-directory -f
# This will build a project with the
#
unityPath=$1 # First argument - Path to the Unity executable.
path=$2 # Second argument - Path to the project root direcrory.
buildmode=$3 # Script build or full build. ( argument s for script build and argument f for full build)
additional=${4:-""}
if [ $buildmode == 'f' ]
then
$unityPath -projectPath "$path" -batchmode -nographics -executeMethod BuildMultiPlatform.Builder.PerformBuildContext -quit $additional
elif [ $fasbuildmodet == 's' ]
then
$unityPath -projectPath "$path" -batchmode -nographics -executeMethod BuildMultiPlatform.Builder.PerformBuildScriptOnlyContext -quit $additional
fi