#!/usr/bin/env bash # ============================================================================= # scripts/add-genome.sh # Helper to add a single new genome to the existing infrastructure. # ============================================================================= set -euo pipefail source "lib/output.sh" source "globals.env" source "registry.sh" GENOME_NAME="${1:-}" GENOME_DESC="${2:-}" GENOME_LINKED="${3:-}" # optional: linked project repo reference if [[ -z "$GENOME_NAME" || -z "$GENOME_DESC" ]]; then error "Missing arguments." echo "Usage: $0 [linked-repo]" exit 1 fi step "Adding New Genome: ${GENOME_NAME}" # Build a 3-field registry entry (linked_repo may be empty) GENOMES=("${GENOME_NAME}|${GENOME_DESC}|${GENOME_LINKED}") source "scripts/setup-genomes.sh" success "Genome '${GENOME_NAME}' added and linked successfully!"