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

Commit e6c6dfe

Browse files
authored
Check if curl is installed and halt if not
Yeah, actually stopping would be smart.
1 parent a09571f commit e6c6dfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

NoFoxGiven.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash
22
echo "NoFoxGiven Snap removal and replacement script for Firefox."
3-
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."
3+
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."
44
read
55
if ! command -v curl &> /dev/null
66
then
7-
echo "curl is not installed on your system. Install it first with sudo apt install curl, then restart this script"
7+
echo "curl is not installed on your system. Install it first with sudo apt install curl, then restart this script."
88
read
9+
exit
910
fi
1011
echo "Now downloading latest Standalone Firefox build"
1112
curl -L -o firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-GB"
@@ -19,6 +20,7 @@ sudo rsync -a ./icons /usr/share
1920
sudo mv ./Firefox.desktop /usr/share/applications/
2021
sudo rm -r ./icons
2122
chmod +x /usr/share/applications/Firefox.desktop
23+
echo
2224
echo "Installation complete!"
2325
echo "Proceeding to remove Snap..."
2426
sleep 5
@@ -36,6 +38,8 @@ sudo rm -rf /var/snap
3638
sudo rm -rf /var/cache/snapd/
3739
sudo rm -rf /var/lib/snapd
3840
sudo apt-mark hold snapd
41+
echo
3942
echo "Removal complete! Snap has also been marked to be held back."
4043
echo "Script complete. You can now close this terminal."
4144
read
45+
exit

0 commit comments

Comments
 (0)