knowledge-genome-orchestrator/scripts/add-genome.sh

29 lines
902 B
Bash

#!/usr/bin/env bash
# =============================================================================
# scripts/add-genome.sh
# Helper to add a single new genome to the existing infrastructure.
# Usage: make add-genome NAME=my-new-genome DESC="Description here"
# =============================================================================
set -euo pipefail
source "lib/output.sh"
source "config.env"
GENOME_NAME="${1:-}"
GENOME_DESC="${2:-}"
if [[ -z "$GENOME_NAME" || -z "$GENOME_DESC" ]]; then
error "Missing arguments."
echo "Usage: $0 <genome-name> <description>"
exit 1
fi
step "Adding New Genome: ${GENOME_NAME}"
# Overwrite the GENOMES array for this session to process only the new one
export GENOMES=("${GENOME_NAME}|${GENOME_DESC}")
# Trigger the standard genome setup logic
bash "scripts/setup-genomes.sh"
success "Genome '${GENOME_NAME}' added and linked successfully!"