#!/bin/bash set -e BAZEL="bazel --output_user_root=~/bazel --output_base=~/bazel/anki" BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore" echo "+++ Building and testing" # move existing node_modules into tree test -e ~/node_modules && mv ~/node_modules . $BAZEL test $BUILDARGS ... echo "--- Cleanup" # if tests succeed, back up node_modules folder mv node_modules ~/