Add python 3.11.12 to env

This commit is contained in:
2025-05-15 11:13:46 +10:00
parent 540cc47183
commit e5980efc3f
2 changed files with 18 additions and 17 deletions
+12 -11
View File
@@ -1,27 +1,28 @@
#!/bin/bash
# Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Setup ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
script_path=$0
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
root_dir="${devenver_root}"
# Arguments :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Arguments ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
clang_dir="$root_dir/LLVM"
cmake_dir="$root_dir/CMake"
node_dir="$root_dir/NodeJS"
python_dir="$root_dir/Python"
virustotal_url="https://www.virustotal.com/gui/file"
# Argument parsing ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Argument parsing :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
option="$1"
shift
if [ "$option" = "clang" ]; then exe_dir="$clang_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "cmake" ]; then exe_dir="$cmake_dir/$1" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "node" ]; then exe_dir="$node_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "python" ]; then exe_dir="$python_dir/$1/install/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "python_env" ]; then PATH="$python_dir/$1/install/bin:$PATH" && shift && cmd_line="$1" && shift; fi
if [ "$option" = "virustotal" ]; then virustotal_hash=$(sha256sum "$1" | awk '{print $1}') && cmd_line="xdg-open $virustotal_url/$virustotal_hash &" && shift; fi
if [ "$option" = "clang" ]; then exe_dir="$clang_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "cmake" ]; then exe_dir="$cmake_dir/$1" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "node" ]; then exe_dir="$node_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "node_env" ]; then PATH="$node_dir/$1/bin:$PATH" && shift && cmd_line="$1" && shift; fi
if [ "$option" = "python" ]; then cmd_prefix="LD_LIBRARY_PATH=$python_dir/$1/install/lib:$LD_LIBRARY_PATH" && exe_dir="$python_dir/$1/install/bin" && PATH="$exe_dir:$PATH" && cmd_line="$exe_dir/$2" && shift && shift; fi
if [ "$option" = "python_env" ]; then cmd_prefix="LD_LIBRARY_PATH=$python_dir/$1/install/lib:$LD_LIBRARY_PATH" && PATH="$python_dir/$1/install/bin:$PATH" && shift && cmd_line="$1" && shift; fi
if [ "$option" = "virustotal" ]; then virustotal_hash=$(sha256sum "$1" | awk '{print $1}') && cmd_line="xdg-open $virustotal_url/$virustotal_hash &" && shift; fi
if [ -z "$cmd_line" ]; then option="help"; fi
if [ "$option" = "help" ]; then
@@ -67,5 +68,5 @@ while [ "${user_args: -1}" = " " ]; do user_args="${user_args% }"; done
while [ "${cmd_line: -1}" = " " ]; do cmd_line="${cmd_line% }"; done
# Eval ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo "DEV: Running '$script_path' with '$cmd_line$user_args'"
eval "$cmd_line$user_args"
echo "DEV: Running '$script_path' with '$cmd_prefix $cmd_line$user_args'"
eval "$cmd_prefix $cmd_line$user_args"