GodotPythonJSONRPC/addons/KiriPythonRPCWrapper/StandalonePythonBuilds/convert_zsts.bsh
2024-07-14 10:23:19 -07:00

22 lines
420 B
Bash
Executable File

#!/bin/bash
# Why do we do this? Because Godot can read zip files but not zst
# files. But we still want to preserve the file attributes in the .tar
# archive.
cd "$(dirname "$0")"
# Decompress zsts...
for ZSTFILE in *.tar.zst; do
if [ \! -e "$(basename ${ZSTFILE} .zst)" ]; then
zstd -d "${ZSTFILE}"
fi
done
# Recompress zips...
for TARFILE in *.tar; do
zip "${TARFILE}.zip" "${TARFILE}"
done