-
Notifications
You must be signed in to change notification settings - Fork 25
/
install_scoop.ps1
73 lines (59 loc) · 1.96 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
72
73
#############################################################
# Install and update scoop packages on Windows
# Author: Vincent Zhang <[email protected]>
# URL: https://github.com/seagle0128/dotfiles
#############################################################
# Packages
$packages = (
# Prerequisites
"git", "gitui", "gow", "gsudo", "less",
# Utilities
"7zip", "everything", "totalcommander", "starship",
# "aspell", "clipx", "putty", "ccleaner", "fork",
# Morden tools
"bat", "bottom", "btop", "delta","duf", "dust", "eza", "fzf", "fd",
"gping", "hyperfine", "tealdeer", "ripgrep", "zoxide",
# Editor
"emacs", # "emacs-kl", "vim",
"vscode",
# Screencast
"licecap", "carnac",
# Music
"mpc", "mpd", "foobar2000",
# Misc
# "go", "python", "ruby", "nodejs-lts",
# "sysinternals", "dependecywalker",
# "clash-verge-rev", "v2rayn"
);
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
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