Forum › Forums › New users › New Users and General Questions › plain & simple AntiX updater script
- This topic has 6 replies, 4 voices, and was last updated May 16-9:43 am by AA BB.
-
AuthorPosts
-
May 15, 2020 at 9:08 pm #35962Member
AA BB
I’m trying to find a script file that I can run manually to update the antiX system I recently created from antiX 19 core.
I dont need anything fancy i.e. icons that change colors to remind me that updates are availableI’m wondering if this one is safe to use with antiX 19 :
https://www.linuxliteos.com/forums/linux-lite-software-development/install-updates-yad-version/
May 15, 2020 at 10:34 pm #35963MemberModdIt
::Hi,
in full version there is AntiX updater, works perfectly. No need to invent anything new, just add it
to your core install.May 16, 2020 at 4:19 am #35971Member
sybok
::Hi,
in case you are still curious and would like to know how to reinvent the wheel for your needs (and perhaps learning something).
If you want a script to run manually, then I assume you want to run it from the console/terminal.
It will involve one of the three utilities: apt/apt-get/aptitude.
Let’s stick with the newest, i.e. ‘apt’.
Since it is common to all (?) Debian-based (incl. *buntu-based) distros, you can transfer it to other such distros as well.1) Create a simple script apt_updater.sh
#!/bin/bash echo "Will run command [sudo apt update && sudo apt full-upgrade && sudo apt autoclean]" sudo apt update && sudo apt full-upgrade && sudo apt autocleanRun as ‘bash <path-to>/apt_updater.sh’.
Let’s assume that the script is located in your home directory.
If you make it executable, ‘chmod u+x ./apt_updater.sh’, you can call it in a simpler manner ‘./apt_updater.sh’.2) NOT A SCRIPT: Create alias in ~/.bashrcdeb_update by adding the following line
alias deb_update='sudo apt update && sudo apt full-upgrade && sudo apt autoclean'Close all terminals (or execute ‘source ~/.bashrc’, equivalent to fancier ‘. ~/.bashrc’ in all of them).
Then the update command (not a script) is available in terminal by simply typing deb_update and hitting enter.Hint: Tabulator completion can be used e.g. write ‘deb_’ only and press the Tab key.
3) NOT A SCRIPT: If you have already used the commands (recently), you can search in history of BASH via Ctrl+R and typing part of the command to search for, e.g. ‘dist-up’.
PS: Did you know about (BA)SH script check utility ‘shellcheck’?
- This reply was modified 2 years, 12 months ago by sybok.
- This reply was modified 2 years, 12 months ago by sybok.
May 16, 2020 at 4:32 am #35975Member
sybok
::Hi,
if still interested and no fancy stuff is needed, then why not simply use terminal/console?
Most likely the smallest memory consumption.1) Script ‘apt_updater.sh’:
#!/bin/bash echo "sudo apt update/full-upgrade/autoclean" sudo apt update && sudo apt full-upgrade && sudo apt autocleanRun as ‘bash <path-to>apt_updater.sh’
Or make it executable ‘chmod u+x apt_updater.sh’ and run as ‘<path-to>/apt_updater.sh’, e.g. ‘./apt_updater.sh’.2) NOT A SCRIPT: ‘~/.bashrc’ alias
Add a line to ‘~/.bashrc’ filealias deb_update='echo "sudo apt update/full-upgrade/autoclean" && sudo apt update && sudo apt full-upgrade && sudo apt autoclean'Close all terminals or execute ‘source ~/.bashrc’ (load the updated ‘~/.bashrc’ file) in all of the opened ones.
Execute in terminal simply by typing ‘deb_update’ and hit enter.PS: Did you know about the ‘shellcheck’ tool for checking (BA)SH scripts (equivalent to Python’s pylint).
[Damn, I have accidentally deleted my previous version of the post. 🙁 ]
- This reply was modified 2 years, 12 months ago by sybok. Reason: Improve formatting
May 16, 2020 at 6:17 am #35980ModeratorBobC
::AA BB I looked at that script. Did you look at it? Its anything but simple. Anyway, Its written specifically for that OS.
I like moddit’s suggestion. Install apt-notifier and either run it from startup or run it when you want to check for and install updates.
from a terminal:
sudo apt update && sudo apt install apt-notifierin ~/.desktop-session/startup or whatever you are using for that:
# Uncomment after installing apt-notifier
#apt-notifier &May 16, 2020 at 9:43 am #35992MemberAA BB
-
AuthorPosts
- You must be logged in to reply to this topic.