sync-to-sandbox.sh 1010 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Restore the runtime artifacts into the sandbox working directory.
  3. # Use after a fresh clone of uunicorn/synaWudfBioUsb-sandbox (work/synaWudfBioUsb-sandbox):
  4. # git clone https://github.com/uunicorn/synaWudfBioUsb-sandbox work/synaWudfBioUsb-sandbox
  5. # work/artifacts/sync-to-sandbox.sh
  6. set -eu
  7. ROOT=/home/nebulon/projects/fingerprint
  8. SANDBOX=${1:-$ROOT/work/synaWudfBioUsb-sandbox}
  9. A=$ROOT/work/artifacts/sandbox
  10. [ -d "$SANDBOX" ] || { echo "sandbox dir missing: $SANDBOX" >&2; exit 1; }
  11. # vendor driver DLLs (kept in driverdlls/ in this repo)
  12. cp -f "$ROOT/driverdlls/synaWudfBioUsb.dll" "$SANDBOX/" || echo "WARN: driverdlls/synaWudfBioUsb.dll missing" >&2
  13. # trust/calibration state + device id + MinGW runtime DLLs + verify-only binary
  14. cp -f "$A"/*.blob "$A"/*.uint "$A/usb.txt" "$A"/*.dll "$SANDBOX/"
  15. cp -f "$A/verify.exe" "$SANDBOX/"
  16. chmod +x "$SANDBOX/verify.exe" 2>/dev/null || true
  17. echo "artifacts restored to $SANDBOX"
  18. echo "note: a.exe / sources come from the git clone itself."