9 lines
223 B
Bash
Executable File
9 lines
223 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
for file in /initdb.d/commandes/*.json; do
|
|
collection=$(basename "$file" .json)
|
|
echo "Importing $collection..."
|
|
mongoimport --db commerce --collection "$collection" --file "$file" --jsonArray
|
|
done
|