9 lines
208 B
Bash
Executable File
9 lines
208 B
Bash
Executable File
#!/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
|