#!/bin/bash

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

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

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

