The officially official Devuan Forum!

You are not logged in.

#1 2024-03-14 09:07:17

swanson
Member
Registered: 2020-04-22
Posts: 103  

Update script for script hobbyists

Just a hobby script I use daily (almost):

#!/bin/bash
echo "___________________ Apt uppdates database ___________________________"
apt update && apt list --upgradeable
echo "-----------> Upgrade? y/NO"
read ANSWER
if [ "$ANSWER" = "y" ]; then
apt upgrade -y
else
echo "No upgrades today!"
fi

I used to use another script but since the problems with kernel 6.1.018 and the Nvidia driver, I like to review the upgrades beforehand. Some upgrades are more system critical than others, and some look fishy too. You have to be prepared. smile

Offline

#2 2024-03-14 22:22:50

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: Update script for script hobbyists

Nice one, thanks! :-)


pic from 1993, new guitar day.

Offline

#3 2024-06-25 10:00:24

tux2bsd
Member
Registered: 2023-12-15
Posts: 21  

Re: Update script for script hobbyists

Apt uppdates database

A small typo fixed & banner message slightly more centrally aligned + code indenting:

#!/bin/bash
echo "________________________ Apt updates database _________________________"
apt update && apt list --upgradeable
echo "-----------> Upgrade? y/NO"
read ANSWER
if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ]; then
    apt upgrade -y
else
    echo "No upgrades today!"
fi

and a bonus accept capital Y

Last edited by tux2bsd (2024-06-25 10:02:56)

Offline

#4 2024-06-27 17:56:50

swanson
Member
Registered: 2020-04-22
Posts: 103  

Re: Update script for script hobbyists

@tux2bsd THANKS!

A spelling mistake!!!! Facepalm....

Offline

Board footer