-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
60 lines (37 loc) · 2.06 KB
/
setup.ps1
File metadata and controls
60 lines (37 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
. $PWD\functions.ps1
$ProgressPreference = 'SilentlyContinue'
Write-Host "`nThis will setup your env with (Git, Composer, NVM, Chocolatey, Some terminal utilities, Cmder)`n"
#region ANSWER QUESTIONS FOR WHICH STEPS TO EXECUTE
$StepsQuestions = [ordered]@{
GIT = [PSCustomObject]@{ Question = "- Download Git ?"; Answer = "no" }
NVM = [PSCustomObject]@{ Question = "- Download NVM (Node Version Manager) ?"; Answer = "no" }
PVM = [PSCustomObject]@{ Question = "- Download PVM (PHP Version Manager) ?"; Answer = "no" }
COMPOSER = [PSCustomObject]@{ Question = "- Download Composer ?"; Answer = "no" }
REDIS = [PSCustomObject]@{ Question = "- Download Redis ?"; Answer = "no" }
TOOLS = [PSCustomObject]@{ Question = "- Download TOOLS (eza, delta, bat, fzf, zoxide, tldr) ?"; Answer = "no" }
CMDER = [PSCustomObject]@{ Question = "- Download & Configure Cmder ?"; Answer = "no" }
FONTS = [PSCustomObject]@{ Question = "- Download Nerd Fonts "; Answer = "no" }
}
foreach ($key in $StepsQuestions.Keys) {
$q = $StepsQuestions[$key]
$q.Answer = Prompt-YesOrNoWithDefault -message $q.Question -defaultOption "yes"
}
#endregion
$WhatWasDoneMessages = @()
$WhatToDoNext = @()
#region SETUP THE CONTAINER DIRECTORY
$downloadPath = $USER_ENV["USER_ENV_PATH"]
Make-Directory -path $downloadPath
$WhatToDoNext = Set-Todo-Message -message "Your dev path is '$downloadPath'" -WhatToDoNext $WhatToDoNext
$overrideExistingEnvVars = Prompt-YesOrNoWithDefault -message "`nWould you like to override the existing environment variables"
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("https://chocolatey.org/install.ps1"))
. $PWD\steps\install-devtools.ps1
. $PWD\steps\install-composer.ps1
. $PWD\steps\install-utils.ps1
. $PWD\steps\install-fonts.ps1
. $PWD\steps\install-cmder.ps1
$WhatToDoNext = Set-Todo-Message -message "Run ./followup.ps1 when you're done for additional cmder configuration" -WhatToDoNext $WhatToDoNext
#region WHAT TO DO NEXT
What-ToDo-Next -WhatWasDoneMessages $WhatWasDoneMessages -WhatToDoNext $WhatToDoNext
#endregion
Refresh-Env