]> git.wh0rd.org - tt-rss.git/commitdiff
updater: check for tar and gunzip using which
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 3 Jan 2013 22:32:41 +0000 (02:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 3 Jan 2013 22:32:41 +0000 (02:32 +0400)
plugins/updater/init.php

index b089e813415c2933ff686bc0be1ce9becf6e127e..6d1ebf36f869ec07f0cd8a098934b8bd29d393ca 100644 (file)
@@ -60,7 +60,7 @@ class Updater extends Plugin {
                        array_push($log, "Checking for tar...");
 
                        $system_rc = 0;
-                       system("tar --version >/dev/null", $system_rc);
+                       system("which tar >/dev/null", $system_rc);
 
                        if ($system_rc != 0) {
                                array_push($log, "Could not run tar executable (RC=$system_rc).");
@@ -70,7 +70,7 @@ class Updater extends Plugin {
                        array_push($log, "Checking for gunzip...");
 
                        $system_rc = 0;
-                       system("gunzip --version >/dev/null", $system_rc);
+                       system("which gunzip >/dev/null", $system_rc);
 
                        if ($system_rc != 0) {
                                array_push($log, "Could not run gunzip executable (RC=$system_rc).");