aboutsummaryrefslogtreecommitdiff
path: root/install.ps1
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-02 15:42:18 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-02 15:43:20 +0800
commit0dc8ed12776c132cdd9d6f2c3a4a2ddfc82b751c (patch)
tree67145300e881b7649d77cccac770b999ee03e46f /install.ps1
parent2de954b15f37c49cff12c8dc64421f567ff0a538 (diff)
fix(install): copy only run files instead of entire repo
Diffstat (limited to 'install.ps1')
-rw-r--r--install.ps120
1 files changed, 20 insertions, 0 deletions
diff --git a/install.ps1 b/install.ps1
new file mode 100644
index 0000000..6de50d5
--- /dev/null
+++ b/install.ps1
@@ -0,0 +1,20 @@
+$tempDir = "./run_script_temp"
+$repoDir = "$tempDir/run"
+
+Write-Host "Creating temporary directory..."
+$null = New-Item -ItemType Directory -Path $tempDir -Force
+
+Write-Host "Cloning https://github.com/catilgrass/run ..."
+git clone "https://github.com/catilgrass/run" $repoDir
+
+Write-Host "Installing files..."
+Copy-Item -Path "$repoDir/run.sh" -Destination (Get-Location) -Force
+Copy-Item -Path "$repoDir/run.ps1" -Destination (Get-Location) -Force
+Copy-Item -Path "$repoDir/.run" -Destination (Get-Location) -Recurse -Force
+
+Write-Host "Cleaning up..."
+[System.GC]::Collect()
+Start-Sleep -Milliseconds 200
+Remove-Item -Path $tempDir -Recurse -Force
+
+Write-Host "Done!"