#!/bin/bash

[ ! -d prebuilt ] && git worktree add -f prebuilt prebuilt && exit 1

rm -f prebuilt/challenger/*
find packages/challenger-ui/dist/prod/ -type f -printf '%P\n' | sort > prebuilt/challenger/bof

while IFS= read -r file; do
  cp packages/challenger-ui/dist/prod/$file prebuilt/challenger/$file
done < prebuilt/challenger/bof

