#!/bin/bash
set -e

for file in /initdb.d/*.json; do
  collection=$(basename "$file" .json)
  echo "Importing $collection..."
  mongoimport --db iut --collection "$collection" --file "$file" --jsonArray
done
