xbmc.sh: read Release info from os-release
authorMarius T <mus.svz@gmail.com>
Fri, 9 Aug 2013 13:06:39 +0000 (15:06 +0200)
committerMarius T <mus.svz@gmail.com>
Fri, 9 Aug 2013 13:06:39 +0000 (15:06 +0200)
If /etc/os-release exists, read the info from there
instead of relying on lsb_release.

see also commit 7a9aa6f5d9ac8df1c79eb06ed63bce8af162c3ba

tools/Linux/xbmc.sh.in

index 02ffa0e..8999b44 100644 (file)
@@ -64,7 +64,10 @@ print_crash_report()
   echo -n " Kernel: " >> $FILE
   uname -rvs >> $FILE
   echo -n " Release: " >> $FILE
-  if which lsb_release > /dev/null; then
+  if [ -f /etc/os-release ]; then
+         . /etc/os-release
+         echo $NAME $VERSION >> $FILE
+  elif which lsb_release > /dev/null; then
     echo >> $FILE
     lsb_release -a 2> /dev/null | sed -e 's/^/    /' >> $FILE
   else