Unverified Commit 39fb5d51 by Slepowid Committed by GitHub

Update deps.sh

"/etc/os-release" is more common than "/etc/lsb-release"
source: https://gist.github.com/natefoo/814c5bf936922dad97ff
parent be738a52
...@@ -13,9 +13,14 @@ set -o nounset ...@@ -13,9 +13,14 @@ set -o nounset
if ! which lsb_release > /dev/null if ! which lsb_release > /dev/null
then then
function lsb_release { function lsb_release {
if [ -f /etc/lsb-release ] if [ -f /etc/os-release ]
then then
cat /etc/lsb-release | grep DISTRIB_ID | cut -d= -f 2 [[ "$1" = "-i" ]] && cat /etc/os-release | grep ^"ID" | cut -d= -f 2
[[ "$1" = "-r" ]] && cat /etc/os-release | grep "VERSION_ID" | cut -d= -d'"' -f 2
elif [ -f /etc/lsb-release ]
then
[[ "$1" = "-i" ]] && cat /etc/lsb-release | grep "DISTRIB_ID" | cut -d= -f 2
[[ "$1" = "-r" ]] && cat /etc/lsb-release | grep "DISTRIB_RELEASE" | cut -d= -f 2
else else
echo Unknown echo Unknown
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment