This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ "$EUID" -ne 0 ] && echo "This installer needs to be run with superuser privileges." >&2 && exit 1 | |
[ ! -d /etc/apt/keyrings ] && install -d -m 0755 /etc/apt/keyrings | |
wget --no-hsts "https://packages.mozilla.org/apt/repo-signing-key.gpg" -O /etc/apt/keyrings/packages.mozilla.org.asc | |
printf "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main\n" > /etc/apt/sources.list.d/mozilla.list | |
printf "# Setting the Firefox package priority to ensure Mozilla’s Deb version is always preferred\nPackage: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000\n" > /etc/apt/preferences.d/mozilla |