#!/bin/bash PKG_DIR="$PWD" OUTPUT_DIR="${PKG_DIR}/out" DEST_DIR=${1:-/data} if [[ -d "$DEST_DIR" ]]; then echo "${DEST_DIR} already exists." 1>&2 exit 1 fi echo "ANIMALS" npm install next@latest npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ npm install -g @cerc-io/laconic-registry-cli npm run build if [[ ! -d "$OUTPUT_DIR" ]]; then echo "Missing output directory: $OUTPUT_DIR" 1>&2 exit 1 fi mv "$OUTPUT_DIR" "$DEST_DIR"