]> scripts.mit.edu Git - wizard.git/commitdiff
Test if math directory exists, to future proof 1.18.0.
authorEdward Z. Yang <ezyang@mit.edu>
Mon, 5 Sep 2011 04:50:23 +0000 (00:50 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Mon, 5 Sep 2011 04:50:23 +0000 (00:50 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
wizard/app/mediawiki.py

index 93fee831fa977ee65969527871f83f1148de9acb..01cfcaf7cf095c01382bb4d799ac86e7ea5bf5e0 100644 (file)
@@ -61,8 +61,9 @@ class Application(app.Application):
             self.install_old(options)
     def install_1_17_0(self, options):
         util.soft_unlink("LocalSettings.php")
-        with util.ChangeDirectory("math"):
-            shell.call("make")
+        if os.path.exists("math"):
+            with util.ChangeDirectory("math"):
+                shell.call("make")
         try:
             result = shell.eval(
                     "php", "maintenance/install.php",
@@ -117,8 +118,9 @@ class Application(app.Application):
     def upgrade(self, d, version, options):
         if not os.path.isfile("AdminSettings.php"):
             shell.call("git", "checkout", "-q", "mediawiki-" + str(version), "--", "AdminSettings.php")
-        with util.ChangeDirectory("math"):
-            shell.call("make")
+        if os.path.exists("math"):
+            with util.ChangeDirectory("math"):
+                shell.call("make")
         try:
             result = shell.eval("php", "maintenance/update.php", "--quick", log=True)
         except shell.CallError as e: