estrai feat_add_lsb_release in file dedicato e migliora rilevamento distro
- nuovo featlib/lsb-release.sh con feat_add_lsb_release - docker.sh importa lsb-release.sh - logica robusta per DISTRIB_ID/DISTRIB_CODENAME con fallback multipli - case-insensitive per LinuxMint/Ubuntu - lsb-release installato on-demand solo se necessario
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#! /bin/bash --
|
||||
[ ! -z "${GREZZO_1737747200}" ] && return; GREZZO_1737747200=0
|
||||
|
||||
function feat_add_lsb_release() {
|
||||
if ! feat_missing "apt-get"; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lsb-release
|
||||
elif ! feat_missing "pacman"; then
|
||||
sudo pacman -S --needed lsb-release
|
||||
elif ! feat_missing "apk"; then
|
||||
sudo apk add --no-cache lsb-release
|
||||
elif ! feat_missing "yum"; then
|
||||
sudo yum install -y redhat-lsb-core
|
||||
elif ! feat_missing "zypper"; then
|
||||
sudo zypper in lsb-release
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user