]> us-delaporte.pagekite.me Git - dotfiles.git/blob - files/paths.ps1
Add Luanti variable
[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:\Program Files\Microsoft VS Code\bin" -optional # One Editor to rule them all
23 Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
24 Add-ToPath "C:\ProgramData\chocolatey\bin" # Package management is nice.
25 Add-ToPath "C:\Program Files (x86)\GnuWin32\bin" -optional # GNU Utils - i.e. rm
26 Add-ToPath "C:\bin\x16emu" -optional # X16 Emulator
27 Add-ToPath "$env:src\x16-demo\tools" -optional # x16 python tools
28 Add-ToPath "$env:src\flutter\bin" -optional # Flutter for Dart
29 Add-ToPath "$env:src\bin" -optional # anything else I need
30 Add-ToPath "$HOME\bin" -optional # anything else I need
31
32 # Command line tools
33 Add-ToPath "$env:src\chart" -optional # command line chart utility edthedev\chart
34 Add-ToPath "$env:src\agenda" -optional # command line chart utility edthedev\chart
35 Add-ToPath "$env:src\todolist" -optional # todo list utility edthedev\todolist
36
37 }
38 else {
39 Add-ToPath "$env:src/bin" -optional # anything else I need
40 Add-ToPath "$HOME/bin" # anything else I need
41 Add-ToPath "$HOME/x16/x16-emulator" -optional # x16 Emulator
42 Add-ToPath "$HOME/src/x16-demo/tools" -optional # x16 python tools
43
44 # Command line tools
45 Add-ToPath "$env:src/chart" -optional # command line chart utility edthedev\chart
46 Add-ToPath "$env:src/agenda" -optional # command line chart utility edthedev\chart
47 Add-ToPath "$env:src/todolist" -optional # todo list utility edthedev\todolist
48 }
49 Add-ToPath "$HOME/go/bin" -optional # x16 python tools
50
51
52 # krew for K8S pluginsa - specifically vtrl
53 Add-ToPath -optional "$HOME/.krew/bin"
54 Add-ToPath -optional 'C:\Users\delaport\AppData\Roaming\Python\Python312\Scripts'
55
56 # $env:path+=";C:\Program Files\Git\bin"
57 # $env:path+=";C:\Program Files (x86)\Microsoft VS Code\"