mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
[godot] Make repository url configurable in setup.sh, see #2463
This commit is contained in:
parent
804605972b
commit
4fb96bb24f
@ -4,12 +4,13 @@ set -e
|
|||||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||||
pushd "$dir" > /dev/null
|
pushd "$dir" > /dev/null
|
||||||
|
|
||||||
if [ $# -lt 2 ] || [ $# -gt 3 ]; then
|
if [ $# -lt 2 ] || [ $# -gt 4 ]; then
|
||||||
echo "Usage: ./setup.sh <Godot branch or tag> <dev:true|false> <mono:true|false>?"
|
echo "Usage: ./setup.sh <Godot branch or tag> <dev:true|false> <mono:true|false>? <godot-repository>?"
|
||||||
echo
|
echo
|
||||||
echo "e.g.:"
|
echo "e.g.:"
|
||||||
echo " ./setup.sh 3.5.2-stable true"
|
echo " ./setup.sh 4.1.3-stable true"
|
||||||
echo " ./setup.sh master false true"
|
echo " ./setup.sh master false true"
|
||||||
|
echo " ./setup.sh master false false https://github.com/my-github-username/godot.git"
|
||||||
echo
|
echo
|
||||||
echo "Note: the 'mono' parameter only works for Godot 4.x+!"
|
echo "Note: the 'mono' parameter only works for Godot 4.x+!"
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ fi
|
|||||||
branch=${1%/}
|
branch=${1%/}
|
||||||
dev=${2%/}
|
dev=${2%/}
|
||||||
mono=false
|
mono=false
|
||||||
|
repo=https://github.com/godotengine/godot.git
|
||||||
|
|
||||||
if [[ $# -eq 3 && "$branch" != 3* ]]; then
|
if [[ $# -eq 3 && "$branch" != 3* ]]; then
|
||||||
mono=${3%/}
|
mono=${3%/}
|
||||||
@ -34,10 +36,13 @@ if [ "$mono" != "true" ] && [ "$mono" != "false" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -eq 4 ]; then
|
||||||
|
repo=${4%/}
|
||||||
|
fi
|
||||||
|
|
||||||
pushd ..
|
pushd ..
|
||||||
rm -rf godot
|
rm -rf godot
|
||||||
git clone --depth 1 https://github.com/godotengine/godot.git -b $branch
|
git clone --depth 1 $repo -b $branch
|
||||||
if [ $dev = "true" ]; then
|
if [ $dev = "true" ]; then
|
||||||
cp -r .idea godot
|
cp -r .idea godot
|
||||||
cp build/custom.py godot
|
cp build/custom.py godot
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user