-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_scoop.ps1
71 lines (58 loc) · 1.88 KB
/
install_scoop.ps1
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
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
#############################################################
# Set development environment on Linux/macOS/Cygwin quickly.
# Author: Maririn312 <[email protected]>
# URL: https://github.com/maririn312/dotfiles
#############################################################
# Packages
$packages = (
# Utilities
"7zip", "everything", "totalcommander",
# "aspell", "clipx", "putty", "ccleaner", "fork",
"git", "gitui", "gow", "gsudo", "less",
"bat", "fzf", "fd", "ripgrep", "ugrep",
"btop", "dust", "eza", "gping", "tealdeer",
# Editor
"emacs", "vscode",
# Screencast
"licecap", "carnac",
# Music
"mpc", "mpd", "foobar2000",
# Misc
# "go", "python", "ruby", "nodejs-lts",
# "sysinternals", "dependecywalker"
"clash-verge"
);
function check {
# check if scoop exists
if (-Not (Get-Command 'scoop' -errorAction SilentlyContinue)) {
Write-Host "`n-> Installing Scoop..."
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
# Invoke-RestMethod get.scoop.sh | Invoke-Expression
Invoke-WebRequest -useb scoop.201704.xyz | Invoke-Expression
scoop config SCOOP_REPO 'https://gitee.com/glsnames/scoop-installer'
scoop bucket add extras
if (-Not (Test-Path $PROFILE)) {
Copy-Item Microsoft.PowerShell_profile.ps1 $PROFILE
# Prerequisit
scoop install starship
Install-Module -Name PSFzf
Install-Module -Name ZLocation
Install-Module -Name git-aliases
Install-Module -Name Terminal-Icons -Repository PSGallery
# Reload
. $PROFILE
}
}
}
function install {
foreach ($p in $packages) {
Write-Host "`n-> Installing $p..."
scoop install ${p}
}
}
function main {
check
install
}
main