#!/bin/bash base_path="$devenver_root/GCC" # Check for help argument if [[ "$1" == "help" || "$1" == "" || "$1" == "--help" || "$1" == "/?" ]]; then echo "USAGE: gcc_env.sh " echo echo "VERSIONS:" ls "$base_path" exit 0 fi # Check if a version is provided if [[ -z "$1" ]]; then echo "Error: No version specified." echo "USAGE: gcc_env.sh " exit 1 fi # Extract the version and remaining arguments version="$1" shift remaining_args="$@" # Execute the command echo "[SCRIPT] Executing $remaining_args" root_path="$base_path/$version" PATH=${root_path}/bin:${root_path}/lib:${root_path}/include:${PATH} $remaining_args