This script automates the installation, update, or removal of the Thorium browser on Debian-based Linux distributions.
This script automates the installation, update, or removal of the Thorium browser
on Debian-based Linux distributions. It checks for the latest version of Thorium
from its GitHub releases, downloads the .deb package, and manages the installation
or update using 'nala', a front-end for 'apt'. The script can also remove an
existing installation of Thorium.
To install Thorium: python manage-thorium.py install
To update Thorium: python manage-thorium.py update
To remove Thorium: python manage-thorium.py remove
This script uses 'nala' for package management, which is a front-end for 'apt'.
Ensure 'nala' is installed on your system. To install 'nala', use:
sudo apt install nala
To ensure you always have the latest version of the Thorium browser, you can set up a daily job on your Linux system using cron
.
-
Open your crontab file by running
crontab -e
in the terminal. -
Add the following line to schedule the script to run daily (example time is 2 AM):
0 2 * * * /usr/bin/python3 /path/to/manage-thorium.py update
Make sure to replace
/path/to/manage-thorium.py
with the actual path to the script on your system. -
Save the file and exit the editor. Your system will now automatically check for and install updates to the Thorium browser each day at the specified time.
A more generalised version of this code, that can be used for different github repositories/projects including such with other package managers can be found here: https://github.com/froeb/ghpm