Skip to content

Commit 41e1631

Browse files
committed
Restore one-line installer with auto-Go installation
1 parent 350b505 commit 41e1631

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,25 @@ A lightning-fast, terminal-based system cleaner and dashboard for Linux, rewritt
1717

1818
## 🚀 Installation
1919

20-
### From Source (Recommended)
20+
### One-Line Installer (Recommended)
21+
This script will install Go (if missing), clone the repo, and build the binary for you.
2122

22-
Requires [Go 1.23+](https://go.dev/dl/) installed.
23+
```bash
24+
curl -sL https://raw.githubusercontent.com/maruf-pfc/bleach/main/install.sh | sudo bash
25+
```
26+
27+
### From Source (Manual)
28+
If you prefer to control the build process:
2329

2430
1. Clone the repository:
2531
```bash
2632
git clone https://github.com/maruf-pfc/bleach.git
2733
cd bleach
2834
```
29-
2. Build the binary:
35+
2. Build:
3036
```bash
3137
go build ./cmd/bleach
3238
```
33-
3. Run:
34-
```bash
35-
./bleach
36-
```
37-
38-
### Optional: Install Globally
39-
```bash
40-
sudo mv bleach /usr/local/bin/
41-
```
4239

4340
## 🎮 Usage
4441

install.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,25 @@ fi
1818
echo "Installing Bleach v1.0.0..."
1919

2020
# 1. Check for Go
21-
# Add standard Go path just in case sudo reset it
2221
export PATH=$PATH:/usr/local/go/bin
2322

2423
if ! command -v go &>/dev/null; then
25-
echo "Error: 'go' command not found."
26-
echo "Tips:"
27-
echo " 1. If Go is installed in your home directory, run this script with: sudo -E ./install.sh"
28-
echo " 2. Or install Go globally: https://go.dev/doc/install"
29-
exit 1
24+
echo "Go not found. Installing Go 1.23.2..."
25+
26+
# Download Go
27+
curl -L "https://go.dev/dl/go1.23.2.linux-amd64.tar.gz" -o /tmp/go.tar.gz
28+
29+
# Remove old installation if exists
30+
rm -rf /usr/local/go
31+
32+
# Extract
33+
tar -C /usr/local -xzf /tmp/go.tar.gz
34+
rm /tmp/go.tar.gz
35+
36+
# Update PATH for this session
37+
export PATH=$PATH:/usr/local/go/bin
38+
39+
echo "Go installed successfully."
3040
fi
3141

3242
# 2. Clean Install / Update

0 commit comments

Comments
 (0)