mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-07 14:38:42 +00:00
22 lines
407 B
Bash
22 lines
407 B
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
IMPORT_DIR="imports"
|
|
shopt -s nullglob
|
|
files=("$IMPORT_DIR"/*.json)
|
|
|
|
if [[ ${#files[@]} -eq 0 ]]; then
|
|
echo "No JSON files found in $IMPORT_DIR"
|
|
exit 0
|
|
fi
|
|
|
|
for json in "${files[@]}"; do
|
|
echo "Processing $json"
|
|
cp "$json" src/config.json
|
|
subdomain=$(jq -r '.subdomain' "$json")
|
|
dest="host/$subdomain"
|
|
rm -rf "$dest"
|
|
voxvera build --config src/config.json
|
|
done
|