xrforge/manyfold/root/hook.d/inotify_MODIFY/package_godot_zip.sh

11 lines
381 B
Bash
Executable file

#!/bin/sh
echo "$1" | grep datapackage || exit 0 # nothing to do
dir=$(dirname $1)
cd "$dir"
echo "[package_experience.sh] zipping $dir.zip"
# overwrite empty godot template project-zip with given URL
test -n "$GODOT_TEMPLATE_ZIP" && timeout 50 wget "$GODOT_TEMPLATE_ZIP" -O ~/template_godot.zip
cp ~/template_godot.zip package_godot.zip
zip package_godot.zip *.glb *.usdz *.obj