Update core.func
This commit is contained in:
parent
03825ae872
commit
77c70c5d1b
@ -262,8 +262,20 @@ ensure_tput() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
is_alpine() {
|
is_alpine() {
|
||||||
echo "[DEBUG] is_alpine(): var_os='${var_os:-}'" >&2
|
local os_id="${var_os:-}"
|
||||||
[[ "${var_os:-}" == "alpine" ]]
|
|
||||||
|
if [[ -z "$os_id" ]]; then
|
||||||
|
if [[ -f /etc/os-release ]]; then
|
||||||
|
os_id="$(
|
||||||
|
. /etc/os-release 2>/dev/null
|
||||||
|
echo "${ID:-}"
|
||||||
|
)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[DEBUG] is_alpine(): os_id='${os_id}'" >&2
|
||||||
|
|
||||||
|
[[ "$os_id" == "alpine" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_verbose_mode() {
|
is_verbose_mode() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user