Page: Previous  1, 2, 3

damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1143
Reply Quote
I just updated the script again, now it's leveraging lsb_release to pull the codename. I think this is what Ubuntu uses under the hood when utilizing add-apt-repository.

Just as some confirmation, can you verify if lsb_release -cs returns back the correct underlying OS on your system? And no biggie if you're busy, I'm curious but also confident it'll do a better job than the bash solution I came up with. The guess_debian_release() function in the accompanying script is already far more advanced than I expected, a testament to how hard it really is to determine what OS you're running now-a-days.
Back to top
sunrat
Status: New User - Welcome
Joined: 19 Feb 2021
Posts: 3
Location: Melbourne AU
Reply Quote
No problem.
In Bullseye:
:: Code ::
$ lsb_release -cs
bullseye

In Sid: (siduction actually, where find --maxdepth 1 would have broken)
:: Code ::
$ lsb_release -cs
sid

Looks copacetic.
Back to top
Display posts from previous:   
Page: Previous  1, 2, 3
All times are GMT - 8 Hours