@aliss@outerheaven.club no you don't understand you're setting "dist" if you use $ID after that point, then you lose our on your ID_LIKE preference if you use $dist after that point, it's not going to be set if ID is already set
@aliss@outerheaven.club my approach means users can just set it themselves :nko_3c: and then uses dist I'm tired now though :apensive: messed with unicode all day
@samgai@vocalounge.cafe@aliss@outerheaven.club is os-release actually defined to be shell syntax? I'm under the impression that it's defined to be systemd-compatible ini, which means it could just be completely broken while being "normal" and "expected"
@aliss@outerheaven.club@samgai@vocalounge.cafe os-release is a system level file with typically correct permissions (0:0 and 644) so anytime a malicious actor can edit it, it's because they have effective root permissions at which point uh... what are you worried they're going to do that they can't ALREADY do?
@aliss@outerheaven.club@samgai@vocalounge.cafe yes, but only because os-release is explicitly shell-compatible I would maybe do it in a subshell but either way, it's fine don't forget to do something like ${ID=$ID_LIKE} or whatever
@aliss@outerheaven.club that's not bad, except you have a mismatch between ID and dist I'd probably do something likegetopts 'd...' # ...
d) dist="$OPTARG" ;; # ....
if [ -z "$dist" ] && [ -f /etc/os-release ]; then
. /etc/os-release
dist="${ID_LIKE:-$ID}"
fiAs one side-note, if this was bash, you could avoid additional leakage using my upvar by slapping the then into a subshell that you source ?
Hi, I'm Tosti.This is my main account.My public account is @toast and my private is @tosti.Follow requests approved based on feels.If you cause a ruckus, I will block you unapologetically - I'm here to be comfy.gay/ace :heartace: :hearttrans:retired occultistI got really sick in September 2021. I'm a lot better nowadays, but a ways off from a full recovery. Be gentle!