Skip to content

Commit da7e1c5

Browse files
committed
Fix unzip-to-build target to only copy build contents
[skip ci]
1 parent cea8354 commit da7e1c5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ XCODEBUILD ?= xcodebuild
1616
NDK_TOOLCHAIN_BIN ?= $(wildcard $(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/*/bin)
1717
ZIP_URL ?=
1818
ZIP_URL_DOWNLOAD_OUTPUT ?= /tmp/godot-lua-pluginscript-unzip-to-build.zip
19+
ZIP_TEMP_FOLDER ?= /tmp/godot-lua-pluginscript-unzip-to-build
1920

2021

2122
CFLAGS += -std=c11 -Ilib/godot-headers -Ilib/high-level-gdnative -Ilib/luajit/src
@@ -238,12 +239,14 @@ set-version:
238239
plugin/plugin.cfg
239240

240241
unzip-to-build:
242+
$(RM) -r $(ZIP_TEMP_FOLDER)/*
241243
ifneq (,$(filter http://% https://%,$(ZIP_URL)))
242244
curl -L $(ZIP_URL) -o $(ZIP_URL_DOWNLOAD_OUTPUT)
243-
cd build && unzip -u $(ZIP_URL_DOWNLOAD_OUTPUT)
245+
unzip $(ZIP_URL_DOWNLOAD_OUTPUT) -d $(ZIP_TEMP_FOLDER)
244246
else
245-
cd build && unzip -u $(ZIP_URL)
247+
unzip $(ZIP_URL) -d $(ZIP_TEMP_FOLDER)
246248
endif
249+
cp -R $(ZIP_TEMP_FOLDER)/addons/godot-lua-pluginscript/build/. build
247250

248251

249252
# Miscelaneous targets

0 commit comments

Comments
 (0)