File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ---------------------------------------------------------------
2
+ # File Name : install.ps1
3
+ # File Authors : Aoran Zeng <ccmywish@qq.com>
4
+ # | ChatGPT <https://chatgpt.com/>
5
+ # Created On : <2024-10-26>
6
+ # Last Modified : <2024-10-26>
7
+ #
8
+ #
9
+ # chsrc installer for Windows
10
+ #
11
+ # ---------------------------------------------------------------
12
+
13
+ # [Environment]::Is64BitProcess # True
14
+
15
+ $osarch = [System.Runtime.InteropServices.RuntimeInformation ]::OSArchitecture
16
+
17
+ $dlarch = " "
18
+
19
+ switch ($osarch ) {
20
+
21
+ " Arm64" {
22
+ $dlarch = " arm64"
23
+ Write-Error " Unsupported platform Arm64" ;
24
+ }
25
+
26
+ " Arm" {
27
+ $dlarch = " arm"
28
+ Write-Error " Unsupported platform Arm" ;
29
+ }
30
+
31
+ ' X64' { $dlarch = " x64" }
32
+ ' X86' { $dlarch = " x86" }
33
+ }
34
+
35
+ $url = " https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-${dlarch} -windows.exe"
36
+
37
+ Write-Output " [INFO] URL: $url "
38
+ curl.exe - L $url - o chsrc.exe
39
+ Write-Output " 🎉 Installation completed, path: ./chsrc.exe"
You can’t perform that action at this time.
0 commit comments