#!/bin/bash # Function to execute a script execute_script() { local script_to_execute="$1" echo "Executing: $script_to_execute" "$script_to_execute" || { echo "Script failed: $script_to_execute" return 1 # Indicate failure } return 0 # Indicate success } # Generate recipes and dishes before deployment (they are build products) if ! (cd cook && make all); then echo "Failed to generate dishes in cook/ (see 'make all' in cook/)" exit 1 fi # Array of scripts scripts=( "./deploy/install-prerequisites-on-linux.sh" "./deploy/core-count.sh" "./deploy/system-memory.sh" "./deploy/deploy-distro.sh" ) # Iterate through the scripts and execute them for script in "${scripts[@]}"; do execute_script "$script" done echo "All scripts executed."