#!/bin/bash

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

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

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

