chore(res): support copying the development package from a local file

This is useful for Nix, where network access is unavailable during a
build.
This commit is contained in:
yvt 2022-07-02 23:04:59 +09:00
parent e7d95e5831
commit 6844e7100c

View File

@ -27,8 +27,13 @@ OUTPUT_DIR="."
if [ -f "$PAK_NAME" ]; then
exit 0
fi
# TODO: Check if the extracted files are present and up-to-date (#988)
wget "$PAK_URL" -O "$PAK_NAME"
if [ -n "$OPENSPADES_DEVPAK_PATH" ]; then
cp "$OPENSPADES_DEVPAK_PATH" "$PAK_NAME"
else
wget "$PAK_URL" -O "$PAK_NAME"
fi
unzip -o "$PAK_NAME" -d "$OUTPUT_DIR"
# relocate paks to the proper location