#!/bin/bash ################################################################################ # Script: build-nes-all.sh # Description: Builds a complete ROM set for the Nintendo Entertainment System # (NES), organizing all ROMs without 1G1R filtering. This script # sets up the environment and calls the main processing script with # the appropriate parameters for comprehensive ROM organization. # # Usage: ./build-nes-all.sh # # Dependencies: # - nointro-processor.sh # - config.sh # - logger.sh # - config-arrays.sh # # Example: # ./build-nes-all.sh ################################################################################ # Determine the directory of the current script SCRIPT_DIR="$(dirname "$(realpath "$0")")" # Determine the project root directory PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" # Load configuration and logger from the script's directory source "${PROJECT_ROOT}/core/config.sh" source "${PROJECT_ROOT}/core/logger.sh" source "${PROJECT_ROOT}/core/config-arrays.sh" # Use default language array (all languages) - no override needed for "all" processing # This allows processing of ROMs from all regions and languages # Log the script name when it is called log "DEBUG" "Starting script: $(basename "$0")" # Function to set up the environment set_environment() { SYSTEM="nes" FILTER="all" SOURCESITE="myrient.erista.me/files/No-Intro" SOURCESYSTEM="Nintendo - Nintendo Entertainment System (Headered)" log "DEBUG" "Environment set up for $SYSTEM with filter $FILTER" } # Function to run the processing script run_processing() { log "INFO" "Starting processing for $SYSTEM with filter $FILTER" "${PROJECT_ROOT}/tools/nointro-processor.sh" -i -d -s "$SYSTEM" -f "$FILTER" -ss "$SOURCESITE" -sy "$SOURCESYSTEM" -l -r -k -u if [ $? -ne 0 ]; then log "ERROR" "Processing failed for $SYSTEM" exit 1 fi } # Function to display a summary display_summary() { log "INFO" "Processing completed successfully for $SYSTEM" log "INFO" "Summary:" log "INFO" " - System: $SYSTEM" log "INFO" " - Filter: $FILTER (all ROMs, no 1G1R filtering)" log "INFO" " - Source: $SOURCESITE/$SOURCESYSTEM" log "INFO" " - Processing: Complete ROM set organization" } # Main script execution main() { set_environment run_processing display_summary } # Run the main function main