Update GCC scripts
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
base_path="$devenver_root/GCC"
|
||||
|
||||
# Check for help argument
|
||||
if [[ "$1" == "help" || "$1" == "" || "$1" == "--help" || "$1" == "/?" ]]; then
|
||||
echo "USAGE: gcc_env.sh <version> <command>"
|
||||
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 <version> <command>"
|
||||
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
|
||||
Reference in New Issue
Block a user