]> apps.delaporte.us Git - dotfiles.git/blob - files/paths.ps1
Syntax on
[dotfiles.git] / files / paths.ps1
1 function Add-ToPath {
2 param (
3 $Path,
4 [switch]$Optional=$false
5 )
6 if(Test-Path $Path){
7 if($iswindows) {
8 $ENV:PATH+=";$PATH"
9 } else {
10 $ENV:PATH+=":$PATH"
11 }
12 } else {
13 if(-Not $Optional) {
14 Write-Error "Add-ToPath failed for $PATH"
15 }
16 }
17 }
18
19 if($IsWindows){
20 # Some Paths that are annoying to find/restore if the installer fails
21 Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
22 Add-ToPath "C:\ProgramData\chocolatey\bin" # Package management is nice.
23 Add-ToPath "C:\Program Files (x86)\GnuWin32\bin" -optional # GNU Utils - i.e. rm
24 Add-ToPath "$env:src\bin" -optional # anything else I need
25 Add-ToPath "$HOME\bin" -optional # anything else I need
26
27 # Command line tools
28 Add-ToPath "$env:src\chart" -optional # command line chart utility edthedev\chart
29 Add-ToPath "$env:src\agenda" -optional # command line chart utility edthedev\chart
30 Add-ToPath "$env:src\todolist" -optional # todo list utility edthedev\todolist
31
32 Add-ToPath "C:\ProgramData\mingw64\mingw64\bin" # for GCC for LazyVim
33 }
34 else {
35 Add-ToPath "$env:src/bin" -optional # anything else I need
36 Add-ToPath "$HOME/bin" # anything else I need
37 Add-ToPath "$HOME/x16/x16-emulator" -optional # x16 Emulator
38 Add-ToPath "$HOME/src/x16-demo/tools" -optional # x16 python tools
39
40 # Command line tools
41 Add-ToPath "$env:src/chart" -optional # command line chart utility edthedev\chart
42 Add-ToPath "$env:src/agenda" -optional # command line chart utility edthedev\chart
43 Add-ToPath "$env:src/todolist" -optional # todo list utility edthedev\todolist
44 }
45 Add-ToPath "$HOME/go/bin" -optional # x16 python tools
46
47 # krew for K8S pluginsa - specifically vtrl
48 Add-ToPath -optional "$HOME/.krew/bin"
49 Add-ToPath -optional 'C:\Users\delaport\AppData\Roaming\Python\Python312\Scripts'
50
51 # $env:path+=";C:\Program Files\Git\bin"
52 # $env:path+=";C:\Program Files (x86)\Microsoft VS Code\"