]> us-delaporte.pagekite.me Git - dotfiles.git/blob - bootstrap.ps1
Pi script
[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 = -Not (Test-Path -Path $doneFlagFile)
14
15 $profileContents = Get-Content $profile
16 if(! $profileContents -contains $sourceMeLine) {
17 Add-Content -Path $profile -Value $sourceMeLine
18 }
19
20 # TODO Install Chocolatey
21
22 if($false) {
23 choco install docker-desktop
24 }
25
26 # Install Python3 and Pip
27
28 # Install Stub PowerShell Profile that sources the one from DotFiles
29
30 # Install profile for Windows Terminal
31 $destFile = "C:\Users\delaport\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json"
32 if(-Not(Test-Path -Path $destFile)) {
33 Copy-Item -Path ./profiles.json -Destination $destFile
34 } else {
35 # Brute force ensure we update our git copy once in awhile.
36 Copy-Item -Path $destFile -Destination ./profiles.json
37 }
38
39 # Vault for secret management
40 # ... and really for coding better intergrations i.e. for RobotFramework
41 if($false) {
42 choco install consul
43 choco install vault
44 }
45
46 # OWASP ZAP for web application security scanning
47 if($false) {
48 choco install zap
49 }
50
51 # Install GNU Make for Windows
52 if($false) {
53 choco install make
54 }
55 ## TODO: Can I set this via command line: chrome://flags/#enable-force-dark
56
57 if($doBootStrap) {
58 # DONE!
59 New-Item -ItemType File -Path $doneFlagFile
60 }
61
62 # ArchiMate for enterprise modeling
63 if($false) {
64 choco install archi
65 }
66
67 if($false) {
68 choco install powershell-core
69 }