1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/env bash declare -a arr=("core" "client" "server") rm -rf docs || exit 0 mkdir docs || exit 0 for i in "${arr[@]}" do cd $i yarn run build mkdir ../docs/$i cp -R docs/* ../docs/$i rm -rf docs cd .. done