-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·33 lines (25 loc) · 984 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·33 lines (25 loc) · 984 Bytes
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
#!/bin/bash
source ./build.env
source ./scripts/utils.sh
CACHE_DIR=${IOS_CACHE_DIR}
SUPPORT_VERSIONS=(${IOS_TEMPLATES[@]})
VERSION=$([ ! -z "$1" ] && echo $1 || echo ${DEFAULT_IOS_TEMPLATE})
GODOT_SOURCE_URL="https://github.com/kyoz/godot-ios-extracted-headers/releases/download/stable"
# Create .cache folder if not existed
if [ ! -d "${CACHE_DIR}" ]; then
mkdir -p "${CACHE_DIR}"
fi
# Check if template version is support or not
if [[ ! " ${SUPPORT_VERSIONS[*]} " =~ " ${VERSION} " ]]; then
echo "- Your template version is not supported yet :'("
exit 1
fi
# Install godot extracted headers, will bypass cached ones
HEADER_FILE=$(get_ios_template_file_name $VERSION)
# Check if version is cached
if test -f "${CACHE_DIR}/${HEADER_FILE}"; then
echo "- Downloaded godot extracted headers version ${VERSION} (cached)"
else
echo "- Downloading godot extracted headers version ${VERSION}..."
wget -P "${CACHE_DIR}" "${GODOT_SOURCE_URL}/${HEADER_FILE}"
fi