mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-09 07:28:43 +00:00
Move data inside package and update references
This commit is contained in:
21
voxvera/src/import_from_json.sh
Normal file
21
voxvera/src/import_from_json.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
Reference in New Issue
Block a user