-
-
Notifications
You must be signed in to change notification settings - Fork 420
Revamp browser install scripts with snap/flatpak support and merge reset-theme into global-theme #1338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamp browser install scripts with snap/flatpak support and merge reset-theme into global-theme #1338
Changes from all commits
b264b84
deb36cf
624f79d
725640d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,43 @@ | |
|
|
||
| . ../../common-script.sh | ||
|
|
||
| setupMozillaRepo() { | ||
| "$ESCALATION_TOOL" install -d -m 0755 /etc/apt/keyrings | ||
| curl -fsSL https://packages.mozilla.org/apt/repo-signing-key.gpg -o /tmp/mozilla-key.gpg | ||
| "$ESCALATION_TOOL" gpg --batch --yes --dearmor -o /etc/apt/keyrings/packages.mozilla.org.gpg /tmp/mozilla-key.gpg 2>/dev/null || { | ||
| "$ESCALATION_TOOL" cp /tmp/mozilla-key.gpg /etc/apt/keyrings/packages.mozilla.org.asc | ||
| } | ||
| rm -f /tmp/mozilla-key.gpg | ||
|
|
||
| "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/mozilla.sources > /dev/null << 'EOF' | ||
| Types: deb | ||
| URIs: https://packages.mozilla.org/apt | ||
| Suites: mozilla | ||
| Components: main | ||
| Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpg | ||
| EOF | ||
|
|
||
| "$ESCALATION_TOOL" tee /etc/apt/preferences.d/mozilla > /dev/null << 'EOF' | ||
| Package: * | ||
| Pin: origin packages.mozilla.org | ||
| Pin-Priority: 1000 | ||
| EOF | ||
| } | ||
|
|
||
| installFirefox() { | ||
| if ! command_exists firefox; then | ||
| printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}" | ||
| case "$PACKAGER" in | ||
| apt-get|nala) | ||
| if [ "$DTYPE" != "ubuntu" ]; then | ||
| if [ "$DTYPE" = "ubuntu" ]; then | ||
| if command_exists snap && snap list firefox 2>/dev/null | grep -q firefox; then | ||
| printf "%b\n" "${YELLOW}Removing Snap Firefox...${RC}" | ||
| "$ESCALATION_TOOL" snap remove firefox | ||
|
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On Ubuntu systems that already have the default Firefox snap, Useful? React with 👍 / 👎. |
||
| fi | ||
| setupMozillaRepo | ||
| "$ESCALATION_TOOL" "$PACKAGER" update | ||
| "$ESCALATION_TOOL" "$PACKAGER" install -y firefox | ||
| else | ||
| "$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr | ||
| fi | ||
| ;; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,13 @@ | |
|
|
||
| . ../../common-script.sh | ||
|
|
||
| installThrorium() { | ||
| installThorium() { | ||
| if ! command_exists thorium-browser; then | ||
| printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}" | ||
| case "$PACKAGER" in | ||
| apt-get|nala) | ||
| "$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list | ||
| "$ESCALATION_TOOL" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/thorium.list | ||
| "$ESCALATION_TOOL" wget --no-hsts -P /etc/apt/sources.list.d/ http://dl.thorium.rocks/debian/dists/stable/thorium.list | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the apt/nala path this now calls Useful? React with 👍 / 👎. |
||
| "$ESCALATION_TOOL" "$PACKAGER" update | ||
| "$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser | ||
| ;; | ||
|
|
@@ -53,4 +53,4 @@ installThrorium() { | |
| } | ||
|
|
||
| checkEnv | ||
| installThrorium | ||
| installThorium | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/sh -e | ||
|
|
||
| . ../../common-script.sh | ||
|
|
||
| configurePacman() { | ||
| conf="/etc/pacman.conf" | ||
|
|
||
| if [ ! -f "$conf" ]; then | ||
| printf "%b\n" "${RED}${conf} not found.${RC}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| "$ESCALATION_TOOL" sed -i 's/^#Color/Color/' "$conf" | ||
| "$ESCALATION_TOOL" sed -i '/^Color/a ILoveCandy' "$conf" | ||
| "$ESCALATION_TOOL" sed -i 's/^#VerbosePkgLists/VerbosePkgLists/' "$conf" | ||
| "$ESCALATION_TOOL" sed -i 's/^#ParallelDownloads/ParallelDownloads/' "$conf" | ||
| if ! grep -q "^ParallelDownloads" "$conf"; then | ||
| printf "%b\n" "${YELLOW}Adding ParallelDownloads...${RC}" | ||
| "$ESCALATION_TOOL" sed -i '/^#ParallelDownloads/a ParallelDownloads = 5' "$conf" | ||
| fi | ||
| "$ESCALATION_TOOL" sed -i "/\[multilib\]/,/Include/"'s/^#//' "$conf" | ||
|
|
||
| printf "%b\n" "${GREEN}pacman.conf configured: Color, ILoveCandy, VerbosePkgLists, ParallelDownloads=5, multilib enabled.${RC}" | ||
| } | ||
|
|
||
| configureMakepkg() { | ||
| conf="/etc/makepkg.conf" | ||
|
|
||
| cores=$(nproc) | ||
| "$ESCALATION_TOOL" sed -i "s/^#MAKEFLAGS=\"-j[0-9]*\"/MAKEFLAGS=\"-j${cores}\"/" "$conf" | ||
| "$ESCALATION_TOOL" sed -i "s/^MAKEFLAGS=\"-j[0-9]*\"/MAKEFLAGS=\"-j${cores}\"/" "$conf" | ||
| if ! grep -q "^MAKEFLAGS" "$conf"; then | ||
| printf "%b\n" "${YELLOW}Adding MAKEFLAGS...${RC}" | ||
| printf "MAKEFLAGS=\"-j%s\"\n" "$cores" | "$ESCALATION_TOOL" tee -a "$conf" > /dev/null | ||
| fi | ||
| printf "%b\n" "${GREEN}MAKEFLAGS set to -j${cores} in makepkg.conf${RC}" | ||
| } | ||
|
|
||
| checkEnv | ||
| configurePacman | ||
| configureMakepkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/sh -e | ||
|
|
||
| . ../../common-script.sh | ||
|
|
||
| installPipewire() { | ||
| "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber lib32-pipewire | ||
|
|
||
| if command_exists systemctl; then | ||
| systemctl --user enable --now pipewire.service pipewire-pulse.service wireplumber.service 2>/dev/null || true | ||
| printf "%b\n" "${GREEN}PipeWire services enabled.${RC}" | ||
| fi | ||
|
|
||
| printf "%b\n" "${GREEN}PipeWire with WirePlumber installed. Reboot or relogin to apply.${RC}" | ||
| } | ||
|
|
||
| checkEnv | ||
| installPipewire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
gpgis missing or--dearmorfails, the fallback copies the downloaded key topackages.mozilla.org.asc, but the source stanza still usesSigned-By: /etc/apt/keyrings/packages.mozilla.org.gpg. On those Ubuntu installsapt updatewill fail because the referenced key file was never created; either ensuregpgis installed or make the stanza reference the actual fallback file.Useful? React with 👍 / 👎.