#!/bin/sh # Create the exported directory mkdir -p build # Locate services/packages and grab only the built files (excluding types if any) for file in $(find . -regex '\./\(packages/[^/]+/dist/lib\|services/[^/]+/dist\)'); do cp --parents -R $file build; done