Skip to content

Commit fdaed20

Browse files
committed
minor fix
1 parent 1ca8f11 commit fdaed20

2 files changed

Lines changed: 33 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ source ~/.config/fish/config.fish
126126

127127
## 🗑️ Uninstallation
128128

129-
To remove ff from your system:
129+
If you installed ff using the quick install method, the uninstaller is already available locally:
130130

131131
```bash
132-
curl -fsSL https://raw.githubusercontent.com/the0807/ff/main/uninstall.sh | bash
132+
bash ~/.config/ff/uninstall.sh
133133
```
134134

135-
Or manually:
135+
If the local uninstaller is not available, you can download it:
136136

137137
```bash
138138
# Download and run the uninstaller

install.sh

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ echo -e "${BLUE}[3/5]${NC} Creating installation directory..."
126126
mkdir -p "$INSTALL_DIR"
127127
echo -e "${GREEN}${NC} Directory created: $INSTALL_DIR"
128128

129-
# --- 4. Download script (curl/wget fallback) ---
129+
# --- 4. Download scripts (curl/wget fallback) ---
130130
echo ""
131-
echo -e "${BLUE}[4/5]${NC} Downloading script..."
131+
echo -e "${BLUE}[4/5]${NC} Downloading scripts..."
132132

133+
# Download main script
133134
if command -v curl >/dev/null 2>&1; then
134135
if curl -fsSL "$REPO_URL" -o "$INSTALL_FILE"; then
135136
echo -e "${GREEN}${NC} Downloaded (via curl): $(basename $INSTALL_FILE)"
@@ -151,6 +152,28 @@ fi
151152

152153
chmod +x "$INSTALL_FILE"
153154

155+
# Download uninstall script
156+
UNINSTALL_FILE="$INSTALL_DIR/uninstall.sh"
157+
UNINSTALL_URL="$REPO_BASE_URL/uninstall.sh"
158+
159+
if command -v curl >/dev/null 2>&1; then
160+
if curl -fsSL "$UNINSTALL_URL" -o "$UNINSTALL_FILE"; then
161+
echo -e "${GREEN}${NC} Downloaded (via curl): uninstall.sh"
162+
else
163+
echo -e "${YELLOW}${NC} Failed to download uninstall.sh (non-critical)"
164+
fi
165+
elif command -v wget >/dev/null 2>&1; then
166+
if wget -qO "$UNINSTALL_FILE" "$UNINSTALL_URL"; then
167+
echo -e "${GREEN}${NC} Downloaded (via wget): uninstall.sh"
168+
else
169+
echo -e "${YELLOW}${NC} Failed to download uninstall.sh (non-critical)"
170+
fi
171+
fi
172+
173+
if [ -f "$UNINSTALL_FILE" ]; then
174+
chmod +x "$UNINSTALL_FILE"
175+
fi
176+
154177
# --- 5. Add to shell config (with Backup) ---
155178
echo ""
156179
echo -e "${BLUE}[5/5]${NC} Updating configuration..."
@@ -190,3 +213,8 @@ echo ""
190213
echo "To start using ff, run:"
191214
echo -e " ${BLUE}source $SHELL_CONFIG${NC}"
192215
echo ""
216+
if [ -f "$INSTALL_DIR/uninstall.sh" ]; then
217+
echo "To uninstall ff later, run:"
218+
echo -e " ${BLUE}bash $INSTALL_DIR/uninstall.sh${NC}"
219+
echo ""
220+
fi

0 commit comments

Comments
 (0)