2025-12-08 12:07:01 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
# Source Emscripten environment
|
|
|
|
|
source /emsdk/emsdk_env.sh 2>/dev/null
|
|
|
|
|
|
2025-12-27 01:07:44 +01:00
|
|
|
# Sync source from host to workspace volume
|
|
|
|
|
# This fixes macOS Docker timestamp issues with bind mounts
|
|
|
|
|
# (autoconf sanity checks fail when timestamps appear inconsistent)
|
2025-12-27 20:09:26 +01:00
|
|
|
# Touch transferred files to set container timestamps for correct make detection
|
2025-12-27 01:07:44 +01:00
|
|
|
if [[ -d /workspace-host ]]; then
|
|
|
|
|
echo "Syncing source code to container volume..."
|
2025-12-27 20:09:26 +01:00
|
|
|
rsync -ai --delete \
|
2025-12-27 01:07:44 +01:00
|
|
|
--exclude='build-wasm' \
|
|
|
|
|
--exclude='output' \
|
2026-05-25 19:41:55 +02:00
|
|
|
--exclude='tools/emsdk' \
|
2025-12-27 20:09:26 +01:00
|
|
|
/workspace-host/ /workspace/ | \
|
|
|
|
|
grep "^>f" | \
|
|
|
|
|
sed "s/^[^ ]* //" | \
|
|
|
|
|
while read f; do touch "/workspace/$f" 2>/dev/null; done
|
2025-12-27 01:07:44 +01:00
|
|
|
echo "Sync complete."
|
|
|
|
|
fi
|
|
|
|
|
|
2025-12-08 12:07:01 +01:00
|
|
|
# Execute command or start shell
|
|
|
|
|
exec "$@"
|