mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-20 20:24:42 +02:00
Check if lsb_release exists before using it (#302)
This commit is contained in:
parent
4c5681b2d8
commit
4d30f771e2
@ -7,9 +7,14 @@ SCRIPT_PATH=$(readlink -f "$0")
|
|||||||
SCRIPT_DIR=$(dirname "${SCRIPT_PATH}")
|
SCRIPT_DIR=$(dirname "${SCRIPT_PATH}")
|
||||||
cd "${SCRIPT_DIR}"
|
cd "${SCRIPT_DIR}"
|
||||||
|
|
||||||
|
# check if lsb_release exists on the system before using it
|
||||||
|
if command -v lsb_release > /dev/null
|
||||||
|
then
|
||||||
distro="$(lsb_release -is)"
|
distro="$(lsb_release -is)"
|
||||||
release="$(lsb_release -rs)"
|
release="$(lsb_release -rs)"
|
||||||
codename="$(lsb_release -cs)"
|
codename="$(lsb_release -cs)"
|
||||||
|
fi
|
||||||
|
|
||||||
sep="\n-------------------------------------------------------------------------------"
|
sep="\n-------------------------------------------------------------------------------"
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user