Add LLM to dev setup
This commit is contained in:
+25
-20
@@ -16,13 +16,19 @@ virustotal_url="https://www.virustotal.com/gui/file"
|
||||
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" = "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 [ "$option" = "clang" ]; then exe_dir="$clang_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$2" && shift && shift; fi
|
||||
if [ "$option" = "cmake" ]; then exe_dir="$cmake_dir/$1" && PATH="$exe_dir:$PATH" && cmd_line="$2" && shift && shift; fi
|
||||
if [ "$option" = "node" ]; then exe_dir="$node_dir/$1/bin" && PATH="$exe_dir:$PATH" && cmd_line="$2" && shift && shift; fi
|
||||
if [ "$option" = "python" ]; then
|
||||
python_root=$python_dir/$1/install
|
||||
# Shit like building UWSGI in Python via PIP with wheel doesn't seem to use
|
||||
# LD_LIBRARY_PATH but LDFLAGS works. Dependency hell
|
||||
cmd_prefix="LDFLAGS=${python_root}/lib LD_LIBRARY_PATH=$python_root/lib:$LD_LIBRARY_PATH PYTHONHOME=$python_root"
|
||||
exe_dir="$python_root/bin"
|
||||
PATH="$exe_dir:$PATH"
|
||||
cmd_line="$2"&& shift && 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
|
||||
@@ -35,26 +41,25 @@ USAGE: dev [option] [args...]
|
||||
|
||||
NOTES:
|
||||
Commands suffixed with '_env' augment the system PATH with the tool's path for the current shell session.
|
||||
You can chain the '_env' commands to augment the PATH, e.g:
|
||||
You can chain the commands to augment the PATH, e.g:
|
||||
|
||||
dev.sh python_env 3.12.9+20250317 dev.sh node 20.18.2 yarn build-everything
|
||||
dev.sh python 3.12.9+20250317 dev.sh node 20.18.2 yarn build-everything
|
||||
|
||||
OPTIONS:
|
||||
cmake [version] [exe] CMake build system: '$cmake_dir/[version]/[exe]'
|
||||
Versions: $cmake_versions
|
||||
cmake [version] [cmd...] CMake build system: 'PATH=$cmake_dir/[version]:\$PATH [cmd...]'
|
||||
Versions: $cmake_versions
|
||||
|
||||
clang [version] [exe] CLANG compiler: '$clang_dir/[version]/[exe]'
|
||||
Example: 'dev clang 18.1.4 clang++.exe --help'
|
||||
Versions: $clang_versions
|
||||
clang [version] [cmd..] CLANG compiler: 'PATH=$clang_dir/[version]:\$PATH [cmd...]'
|
||||
Example: 'dev clang 18.1.4 clang++.exe --help'
|
||||
Versions: $clang_versions
|
||||
|
||||
node [version] [exe] Node JS: '$node_dir/[version]/[exe]'
|
||||
Versions: $node_versions
|
||||
node [version] [cmd...] Node JS: 'PATH=$node_dir/[version]:\$PATH [cmd...]'
|
||||
Versions: $node_versions
|
||||
|
||||
python [version] [exe] Python: '$python_dir/[version]/install/bin/[exe]'
|
||||
python_env [cmd...] '$python_dir/[version]/install/bin:[PATH]'
|
||||
Versions: $python_versions
|
||||
python [version] [cmd...] Python: 'PATH=$python_dir/[version]/install/bin:\$PATH [cmd...]'
|
||||
Versions: $python_versions
|
||||
|
||||
virustotal [file] Lookup file SHA256 hash on VirusTotal: '$virustotal_url/[file]'
|
||||
virustotal [file] Lookup file SHA256 hash on VirusTotal: '$virustotal_url/[file]'
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user