Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Check if curl is installed and halt if not
Browse files Browse the repository at this point in the history
Yeah, actually stopping would be smart.
  • Loading branch information
Jacksaur authored Mar 28, 2022
1 parent a09571f commit e6c6dfe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions NoFoxGiven.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash
echo "NoFoxGiven Snap removal and replacement script for Firefox."
echo "WARNING: If you have not backed up your Firefox profile, *EVERYTHING WILL BE LOST*. Close this command prompt and check the Github page for instructions on how to do so. Otherwise, press Enter to continue."
echo "WARNING: If you have not backed up your Firefox profile, **EVERYTHING WILL BE LOST**. Close this command prompt and check the Github page for instructions on how to do so. Otherwise, press Enter to continue."
read
if ! command -v curl &> /dev/null
then
echo "curl is not installed on your system. Install it first with sudo apt install curl, then restart this script"
echo "curl is not installed on your system. Install it first with sudo apt install curl, then restart this script."
read
exit
fi
echo "Now downloading latest Standalone Firefox build"
curl -L -o firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-GB"
Expand All @@ -19,6 +20,7 @@ sudo rsync -a ./icons /usr/share
sudo mv ./Firefox.desktop /usr/share/applications/
sudo rm -r ./icons
chmod +x /usr/share/applications/Firefox.desktop
echo
echo "Installation complete!"
echo "Proceeding to remove Snap..."
sleep 5
Expand All @@ -36,6 +38,8 @@ sudo rm -rf /var/snap
sudo rm -rf /var/cache/snapd/
sudo rm -rf /var/lib/snapd
sudo apt-mark hold snapd
echo
echo "Removal complete! Snap has also been marked to be held back."
echo "Script complete. You can now close this terminal."
read
exit

0 comments on commit e6c6dfe

Please sign in to comment.