]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Avoid running grep
authorAndrew Ruthven <andrew@etc.gen.nz>
Mon, 14 Jan 2019 10:53:35 +0000 (23:53 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Mon, 14 Jan 2019 10:53:35 +0000 (23:53 +1300)
bin/mythtv-update-motd

index 46542da4b8962f75473d87acd7f12f3ef3b829ef..44ff0f331b1a96510e8405ad0e04d58396a6673c 100755 (executable)
@@ -44,7 +44,7 @@ else
 
   if [ -f /etc/os-release ]
   then
-    DISTRO=$(grep ^ID= /etc/os-release | awk -F= '{ print $2 }')
+    DISTRO=$(awk -F= '$1 == "ID" { print $2 }' /etc/os-release)
   else
     DISTRO='unknown'
   fi