#!/bin/bash

set -e

for d in *; do
  if [ -d "$d" ]; then
    pushd "$d" || exit 1
    rm -rf .pub .test
    zs build
    mv .pub .test
    popd || exit 1
  fi
done