@@ -126,10 +126,11 @@ echo -e "${BLUE}[3/5]${NC} Creating installation directory..."
126126mkdir -p " $INSTALL_DIR "
127127echo -e " ${GREEN} ✓${NC} Directory created: $INSTALL_DIR "
128128
129- # --- 4. Download script (curl/wget fallback) ---
129+ # --- 4. Download scripts (curl/wget fallback) ---
130130echo " "
131- echo -e " ${BLUE} [4/5]${NC} Downloading script ..."
131+ echo -e " ${BLUE} [4/5]${NC} Downloading scripts ..."
132132
133+ # Download main script
133134if 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 ) "
151152
152153chmod +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) ---
155178echo " "
156179echo -e " ${BLUE} [5/5]${NC} Updating configuration..."
@@ -190,3 +213,8 @@ echo ""
190213echo " To start using ff, run:"
191214echo -e " ${BLUE} source $SHELL_CONFIG ${NC} "
192215echo " "
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