]> git.wh0rd.org Git - tt-rss.git/commitdiff
updater: add gunzip checking
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 25 Dec 2012 08:26:29 +0000 (12:26 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 25 Dec 2012 08:26:29 +0000 (12:26 +0400)
plugins/updater/updater.php

index 1dbd5ab6641054a96c0224dd7c26234c8c4403a7..b089e813415c2933ff686bc0be1ce9becf6e127e 100644 (file)
@@ -67,6 +67,17 @@ class Updater extends Plugin {
                                $stop = true; break;
                        }
 
+                       array_push($log, "Checking for gunzip...");
+
+                       $system_rc = 0;
+                       system("gunzip --version >/dev/null", $system_rc);
+
+                       if ($system_rc != 0) {
+                               array_push($log, "Could not run gunzip executable (RC=$system_rc).");
+                               $stop = true; break;
+                       }
+
+
                        array_push($log, "Checking for latest version...");
 
                        $version_info = json_decode(fetch_file_contents("http://tt-rss.org/version.php"),