]> apps.delaporte.us Git - dotfiles.git/blob - bootstrap.ps1
9cefade075b0031b6749dd4b7dcb1aa1a9feed29
[dotfiles.git] / bootstrap.ps1
1 # Setup my PowerShell Profile (on Windows)
2 if(-Not(Test-Path -Path $profile)) {
3 New-Item -Path "$profile" -ItemType File
4 }
5 $sourceMeFile = "$pwd\Microsoft.PowerShell_profile.ps1"
6 $sourceMeLine = '$profileContents = [string]::join([environment]::newline, (get-content -path'
7 $sourceMeLine += $sourceMeFile
8 $sourceMeLine += '));invoke-expression $profileContents'
9
10 Write-Host $sourceMeLine
11
12 $doneFlagFile = "./DONE.md"
13 $doBootStrap = Test-Path -Path $doneFlagFile
14
15 $profileContents = Get-Content $profile
16 if(! $profileContents -contains $sourceMeLine) {
17 Add-Content -Path $profile -Value $sourceMeLine
18 }
19 # Install Chocolatey
20 if($false) {
21 choco install docker-desktop
22 }
23
24 # Install Python3 and Pip
25
26 # Install Stub PowerShell Profile that sources the one from DotFiles
27
28 # Install profile for Windows Terminal
29 $destFile = "C:\Users\delaport\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json"
30 if(-Not(Test-Path -Path $destFile)) {
31 Copy-Item -Path ./profiles.json -Destination $destFile
32 } else {
33 # Brute force ensure we update our git copy once in awhile.
34 Copy-Item -Path $destFile -Destination ./profiles.json
35 }
36
37 # Vault for secret management
38 # ... and really for coding better intergrations i.e. for RobotFramework
39 if($false) {
40 choco install consul
41 choco install vault
42 }
43
44 # OWASP ZAP for web application security scanning
45 if($false) {
46 choco install zap
47 }
48
49 # Install GNU Make for Windows
50 if($false) {
51 choco install make
52 }
53 ## TODO: Can I set this via command line: chrome://flags/#enable-force-dark
54
55 if($doBootStrap) {
56 # DONE!
57 New-Item -ItemType File -Path $doneFlagFile
58 }