Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Install or update non-snap Chrome Chromium from Debian
- sudo -v
- sourcefile=/etc/apt/sources.list.d/debian-chromium.list
- sources='
- deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://ftp.us.debian.org/debian/ stable main
- deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://security.debian.org/ stable/updates main
- # stable-updates, previously known as "volatile"
- deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://ftp.us.debian.org/debian/ stable-updates main
- '
- prefsfile=/etc/apt/preferences.d/debian-chromium.pref
- prefs='
- Explanation: Prevent installing from debian repo.
- Package: *
- Pin: origin "*.debian.org"
- Pin-Priority: 1
- Explanation: Allow installing chromium from debian repo.
- Package: chromium*
- Pin: origin "*.debian.org"
- Pin-Priority: 100
- '
- if [[ ! -f ${sourcefile}.save ]]; then
- echo "$sources" | sudo tee ${sourcefile}.save
- echo "$prefs" | sudo tee $prefsfile
- fi
- read -p "Ready to enable Debian sources? <enter> "
- sudo apt install debian-archive-keyring
- sudo mv ${sourcefile}.save $sourcefile
- sudo apt update
- read -p "Ready to update Chromium? <enter> "
- sudo apt install chromium
- read -p "Ready to disable Debian sources? <enter> "
- sudo mv $sourcefile ${sourcefile}.save
- sudo apt update
- echo
- echo "Suggest you rename Chromium in launch menu to: Chromium Debian non-snap"
Advertisement
Add Comment
Please, Sign In to add comment