]> apps.delaporte.us Git - dotfiles.git/blob - files/paths.ps1
Fix?
[dotfiles.git] / files / paths.ps1
1 function Add-ToPath {
2 param (
3 $Path,
4 [switch]$Optional=$false
5 )
6 if(Test-Path $Path){
7 $ENV:PATH+=";$PATH"
8 } else {
9 if(-Not $Optional) {
10 Write-Error "Add-ToPath failed for $PATH"
11 }
12 }
13 }
14
15 if($IsWindows){
16 # Some Paths that are annoying to find/restore if the installer fails
17 Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
18 Add-ToPath "C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all
19 Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
20 Add-ToPath "C:\ProgramData\chocolatey\bin" # Package management is nice.
21 Add-ToPath "C:\Program Files (x86)\GnuWin32\bin" # GNU Utils - i.e. rm
22 Add-ToPath "C:\bin\x16emu" -optional # X16 Emulator
23 Add-ToPath "$env:src\x16-demo\tools" -optional # x16 python tools
24 Add-ToPath "$env:src\flutter\bin" -optional # Flutter for Dart
25 Add-ToPath "$env:src\bin" -optional # anything else I need
26 Add-ToPath "$HOME\bin" -optional # anything else I need
27 }
28 else {
29 Add-ToPath "$env:src/bin" -optional # anything else I need
30 Add-ToPath "$HOME\bin" -optional # anything else I need
31 Add-ToPath "$HOME/x16/x16-emulator" -optional # x16 Emulator
32 Add-ToPath "$HOME/src/x16-demo/tools" -optional # x16 python tools
33 }
34
35 # Command line tools
36 Add-ToPath "$env:src\chart" -optional # command line chart utility edthedev\chart
37 Add-ToPath "$env:src\agenda" -optional # command line chart utility edthedev\chart
38 Add-ToPath "$env:src\todolist" -optional # todo list utility edthedev\todolist