aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--index.html8
-rw-r--r--install.ps120
-rw-r--r--install.sh (renamed from install/install.sh)14
-rw-r--r--install/install.ps133
5 files changed, 29 insertions, 50 deletions
diff --git a/README.md b/README.md
index 988ecee..6c48cd5 100644
--- a/README.md
+++ b/README.md
@@ -18,14 +18,14 @@ Any script can be dropped in. After that, just run `.\run.ps1 script-name` or `.
For Linux:
```bash
-curl -fsSL https://raw.githubusercontent.com/catilgrass/run/refs/heads/master/install/install.sh | bash
+curl -fsSL https://catilgrass.github.io/run/install.sh | bash
chmod +x run.sh
```
For Windows:
```bash
-iwr -useb https://raw.githubusercontent.com/catilgrass/run/refs/heads/master/install/install.ps1 | iex
+iwr -useb https://catilgrass.github.io/run/install.ps1 | iex
```
## Or manually install
diff --git a/index.html b/index.html
index b7fe1bf..83c0c5a 100644
--- a/index.html
+++ b/index.html
@@ -27,7 +27,7 @@
background: #161b22;
border: 1px solid #30363d;
border-radius: 16px;
- padding: 3rem 4rem;
+ padding: 3rem 2.8rem;
max-width: 720px;
width: 100%;
text-align: center;
@@ -205,8 +205,7 @@
<span class="label">Install</span>
<code
><span class="prompt">$</span> curl -fsSL
- https://raw.githubusercontent.com/catilgrass/run/refs/heads/master/install/install.sh
- | bash</code
+ https://catilgrass.github.io/run/install.sh | bash</code
>
<code><span class="prompt">$</span> chmod +x run.sh</code>
</div>
@@ -215,8 +214,7 @@
<span class="label">Install</span>
<code
><span class="prompt">PS&gt;</span> iwr -useb
- https://raw.githubusercontent.com/catilgrass/run/refs/heads/master/install/install.ps1
- | iex</code
+ https://catilgrass.github.io/run/install.ps1 | iex</code
>
</div>
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!"
diff --git a/install/install.sh b/install.sh
index b7e23f4..07f7e5a 100644
--- a/install/install.sh
+++ b/install.sh
@@ -10,19 +10,13 @@ mkdir -p "$TEMP_DIR"
echo "Cloning https://github.com/catilgrass/run ..."
git clone https://github.com/catilgrass/run "$REPO_DIR"
-echo "Removing unwanted files..."
-rm -f "$REPO_DIR/README.md" "$REPO_DIR/LICENSE"
-rm -f "$REPO_DIR/.nojekyll" "$REPO_DIR/index.html"
-rm -rf "$REPO_DIR/install"
-
-echo "Removing git data..."
-rm -rf "$REPO_DIR/.git"
-
echo "Installing files..."
-cp -a "$REPO_DIR/." .
+cp -a "$REPO_DIR/run.sh" .
+cp -a "$REPO_DIR/run.ps1" .
+cp -a "$REPO_DIR/.run" .
chmod +x run.sh
-echo "Cleaning up temporary directory..."
+echo "Cleaning up..."
rm -rf "$TEMP_DIR"
echo "Done!"
diff --git a/install/install.ps1 b/install/install.ps1
deleted file mode 100644
index acf569c..0000000
--- a/install/install.ps1
+++ /dev/null
@@ -1,33 +0,0 @@
-$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 "Removing unwanted files..."
-Remove-Item -Path "$repoDir/README.md", "$repoDir/LICENSE" -Force -ErrorAction SilentlyContinue
-Remove-Item -Path "$repoDir/.nojekyll", "$repoDir/index.html" -Force -ErrorAction SilentlyContinue
-Remove-Item -Path "$repoDir/install" -Recurse -Force -ErrorAction SilentlyContinue
-
-Write-Host "Removing git data..."
-Remove-Item -Path "$repoDir/.git" -Recurse -Force -ErrorAction SilentlyContinue
-
-Write-Host "Installing files..."
-Get-ChildItem -Path $repoDir -Force | ForEach-Object {
- $dest = Join-Path (Get-Location) $_.Name
- if ($_.PSIsContainer) {
- Copy-Item -Path $_.FullName -Destination $dest -Recurse -Force
- } else {
- Copy-Item -Path $_.FullName -Destination $dest -Force
- }
-}
-
-Write-Host "Cleaning up temporary directory..."
-[System.GC]::Collect()
-Start-Sleep -Milliseconds 200
-Remove-Item -Path $tempDir -Recurse -Force
-
-Write-Host "Done!"