#!/bin/bash # Batch runner script that processes multiple configuration files # Set paths - adjust these as needed PYTHON_PROGRAM="svg_processor.py" # Replace with your actual Python program path INPUT="3T_logo_master.svg" # Path to input CONFIG_DIR="configs" # Path to configs folder OUTPUT="out" # Path to output folder # Create output directory if it doesn't exist mkdir -p "$OUTPUT_DIR" # Check if config directory exists if [ ! -d "$CONFIG_DIR" ]; then echo "Error: Config directory $CONFIG_DIR does not exist" exit 1 fi # Loop through all config files in the config folder for config_file in "$CONFIG_DIR"/*; do # Skip if no configs found or if it's not a file [ -e "$config_file" ] || continue # Get the base name of the config file (without extension) config_name=$(basename "$config_file" .conf) echo "Processing configuration: $config_name" # Run your Python program with input, config, and output paths python3 "$PYTHON_PROGRAM" "$INPUT" "$config_file" "$OUTPUT" if [ $? -eq 0 ]; then echo "Successfully processed: $config_name" else echo "Failed to process: $config_name" fi echo "---" done echo "Batch processing complete!"