dont fail if lsb_release does not exist

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-31 16:16:10 +01:00
parent de84542579
commit d4aa04f35d
4 changed files with 16 additions and 8 deletions

View file

@ -19,5 +19,7 @@
#
#
lsb_release=$(which lsb_release)
[ -x $lsb_release ] && $lsb_release --short --codename
lsb_release=$(which lsb_release 2>/dev/null)
if [ -x "$lsb_release" ]; then
$lsb_release --short --codename
fi

View file

@ -19,5 +19,7 @@
#
#
lsb_release=$(which lsb_release)
[ -x $lsb_release ] && $lsb_release --short --description
lsb_release=$(which lsb_release 2>/dev/null)
if [ -x "$lsb_release" ]; then
$lsb_release --short --description
fi

View file

@ -19,5 +19,7 @@
#
#
lsb_release=$(which lsb_release)
[ -x $lsb_release ] && $lsb_release --short --id
lsb_release=$(which lsb_release 2>/dev/null)
if [ -x "$lsb_release" ]; then
$lsb_release --short --id
fi

View file

@ -19,5 +19,7 @@
#
#
lsb_release=$(which lsb_release)
[ -x $lsb_release ] && $lsb_release --short --release
lsb_release=$(which lsb_release 2>/dev/null)
if [ -x "$lsb_release" ]; then
$lsb_release --short --release
fi