refactor: lazy load os-release
This commit is contained in:
parent
53d0e6045b
commit
4e5c38b912
|
@ -14,8 +14,11 @@ alias mkdir="mkdir -p"
|
||||||
alias rm="rm -rf"
|
alias rm="rm -rf"
|
||||||
|
|
||||||
## Use GNU grep, busybox grep is not as performant
|
## Use GNU grep, busybox grep is not as performant
|
||||||
. "/etc/os-release"
|
DISTRO=""
|
||||||
DISTRO="$ID"
|
if [ -f "/etc/os-release" ]; then
|
||||||
|
. "/etc/os-release"
|
||||||
|
DISTRO="$ID"
|
||||||
|
fi
|
||||||
|
|
||||||
check_grep() {
|
check_grep() {
|
||||||
if [ -z "$(grep --help | grep 'GNU')" ]; then
|
if [ -z "$(grep --help | grep 'GNU')" ]; then
|
||||||
|
|
Loading…
Reference in New Issue