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