28 lines
834 B
Bash
28 lines
834 B
Bash
#!/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 "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}"
|
|
|
|
# Sovrascrivo l'array per la sessione corrente
|
|
GENOMES=("${GENOME_NAME}|${GENOME_DESC}")
|
|
|
|
# FIX BUG 2: Uso source invece di bash per mantenere il context dell'array
|
|
source "scripts/setup-genomes.sh"
|
|
|
|
success "Genome '${GENOME_NAME}' added and linked successfully!"
|