-
Notifications
You must be signed in to change notification settings - Fork 26
/
pwsh.yml
63 lines (61 loc) · 2.4 KB
/
pwsh.yml
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
version: 7.4.6
description: PowerShell Core. Cross-Platform task automation and configuration management framework/tool.
homepage: https://github.com/PowerShell/PowerShell
license:
identifier: MIT
url: https://github.com/PowerShell/PowerShell/blob/master/LICENSE.txt
changelog: https://github.com/PowerShell/PowerShell/releases/tag/v7.4.6
architecture:
64bit:
url: https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x64.zip
hash: ed49ce5adb2162cc4a835d740486be729ba904627cca71fcb6c2b95be11b993d
32bit:
url: https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x86.zip
hash: eebaf9cdb0c2ce63c2a9521d17877b2c5ddf2b8969c11e55e3c566d9af46ddb7
arm64:
url: https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-arm64.zip
hash: 875af8ae039abb583976129b8508c7cc39f0371ae790db096561e44019da0165
pre_install: |
Test-Persistence 'Microsoft.PowerShell_profile.ps1', 'profile.ps1'
#### Variables
$GIST = 'https://gist.githubusercontent.com/Ash258/e143436e2f9183a650424d635b535e51/raw'
$PWSH_PATH = "$dir".Replace('\', '\\')
$INS_REG = "$dir\pwsh-context-ins.reg"
$UNINS_REG = "$dir\pwsh-context-un.reg"
#### Downloading
$content = (New-Object System.Net.WebClient).DownloadString("$GIST/pwsh-context-ins.reg")
$content = $content.Replace('%%dir%%', $PWSH_PATH)
#### SET FILES
Out-UTF8File $INS_REG $content
$content = (New-Object System.Net.WebClient).DownloadString("$GIST/pwsh-context-un.reg")
Out-UTF8File $UNINS_REG $content
#### Append registry
regedit /s $INS_REG
pre_uninstall: |
#### Remove registry entry
regedit /s "$dir\pwsh-context-un.reg"
bin:
- - pwsh.exe
- pwsh
- -NoLogo
shortcuts:
- - pwsh.exe
- PowerShell Core
- -NoLogo
persist:
- Microsoft.PowerShell_profile.ps1
- profile.ps1
checkver:
github: https://www.github.com/PowerShell/PowerShell
autoupdate:
archive: true
changelog: https://github.com/PowerShell/PowerShell/releases/tag/v$version
architecture:
64bit:
url: https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-x64.zip
32bit:
url: https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-x86.zip
arm64:
url: https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-arm64.zip
hash:
url: $baseurl/hashes.sha256