You are not logged in.

#1 2026-03-29 20:29:19

intwitch
Member
Registered: 2026-03-29
Posts: 2

Making a bash script that pesters you to update

I have developed a bash script designed to yell at you if you don't update long enough, that I hope covers as many edge cases as possible. pesterupdate.

This is the github repo for it

it doesn't actually update/upgrade/sync anything, it just pesters you if you haven't. And if you put it in a .bashrc it'll, possibly, pester you every time you open a terminal without updating.

works by grep-ing the pacman log for the last sync and upgrade. It used to work by looking for any occurrence of "pacman -Syu", but i was worried about A) it not working for anyone who runs -Sy and -Su separately, for whatever reason, and B) it not working for anyone who runs "pacman -Suy". An extremely cursed, but, as far as I can still tell, valid method.

Although quite frankly if anyone actually does "pacman -Suy" I'll be both horrified and surprised in equal measure.

I'm considering a pacman hook... Maybe if someone's pacman log is thousands of lines long it'll take too long to grep? I don't know how likely that really is though.

but to get back to the point of this post, I've tried to add options for anything I think anyone could want, but before I make it into a proper package I figured I'd throw it to the wolves here.

Please do just make suggestions for options or just, roast my code. There's almost definitely a lot that could be better optimized in there.

I'm aware of checkupdates but, this feels different enough that I feel confident enough sending it off to AUR, eventually.

Offline

#2 2026-04-01 09:34:23

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,243

Re: Making a bash script that pesters you to update

How does it pester you? Is it usable with custom scripts too?

(Does it support shock collars? wink )

Last edited by jl2 (2026-04-01 09:35:25)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#3 2026-04-01 11:08:15

cryptearth
Member
Registered: 2024-02-03
Posts: 2,025

Re: Making a bash script that pesters you to update

jl2 wrote:

(Does it support shock collars? wink )

As we learned from Futurama: With time you become accustomed even to such measures.

Offline

#4 2026-04-02 06:00:01

intwitch
Member
Registered: 2026-03-29
Posts: 2

Re: Making a bash script that pesters you to update

jl2 wrote:

How does it pester you? Is it usable with custom scripts too?

(Does it support shock collars? wink )

As of now, it just prints out customizable message(s), but I do wanna give it the option to run something on pester, (or on all clear. Who knows?).

(Developing/Installing a command line tool to activate a shock collar is an exercise left to the user)

Offline

#5 2026-04-02 06:41:12

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,243

Re: Making a bash script that pesters you to update

As we learned from Futurama: With time you become accustomed even to such measures. As we learned from Futurama: With time you become accustomed even to such measures.

Strap lots of C4 to your chair and add a buzzer warner. I don't think you'll get around that.

(Alternatives include Airstrikes, Orbital Strikes, a bunch of hitmen, opening biohazard containers, etc. pp. but I'll stop before it gets ugly)

(Developing/Installing a command line tool to activate a shock collar is an exercise left to the user)

Awww man what a bummer. Would surely be the first one to support a shock collar tongue

Last edited by jl2 (2026-04-02 06:42:17)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#6 2026-04-02 08:40:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,273

Re: Making a bash script that pesters you to update

awk -F"[][]" '/starting full system upgrade/{print $2}' /var/log/pacman.log | tail -1

Offline

Board footer

Powered by FluxBB