#!/bin/bash # Check if FAST_PATH is set in .bashrc source ~/.bashrc if [ -z "$FAST_PATH" ]; then echo "FAST_PATH is not set in your environment. Please check your .bashrc file." exit 1 fi # Navigate to the Fast installation directory echo "Starting Fast build process in $FAST_PATH..." cd "$FAST_PATH" || { echo "Failed to navigate to $FAST_PATH. Directory does not exist."; exit 1; } # ask the user for selection of components to build COMPONENTS=("secret_manager" "access_manager" "task_manager" "data_manager" "bill_manager" "load_manager") for COMPONENT in "${COMPONENTS[@]}"; do read -p "Do you want to build $COMPONENT? (Y/n): " BUILD_COMPONENT if [[ "$BUILD_COMPONENT" == "y" || "$BUILD_COMPONENT" == "Y" || $BUILD_COMPONENT == "" ]]; then bin/build "$COMPONENT:latest" else echo "Skipping build for $COMPONENT." fi done