]> scripts.mit.edu Git - wizard.git/commitdiff
Make phpBB installer more friendly for restricted envs.
authorEdward Z. Yang <ezyang@mit.edu>
Mon, 7 Dec 2009 08:29:23 +0000 (03:29 -0500)
committerEdward Z. Yang <ezyang@mit.edu>
Mon, 7 Dec 2009 08:29:23 +0000 (03:29 -0500)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
tests/prepare [new file with mode: 0644]
tests/setup
wizard/app/phpBB.py

diff --git a/tests/prepare b/tests/prepare
new file mode 100644 (file)
index 0000000..35ef0d9
--- /dev/null
@@ -0,0 +1 @@
+mysql $MYSQL_ARGS -e "CREATE DATABASE \`wizard_test_$TESTID\`;"
index 9e3d535f4c06b78d0e2e5bf979e7b6718a571524..5ad70ccbad46267174b50604b9f51635a5bc6e07 100644 (file)
@@ -34,3 +34,7 @@ if [ -e "$TESTDIR" ]; then
     wizard remove "$TESTDIR" || rm -Rf "$TESTDIR"
 fi
 
+if [ -e "prepare" ]; then
+    source ./prepare
+fi
+
index e356857f434becd59cfb4a4faefea1c3e4919265..4fb1602126583e47c609e2c94f92ad4237619918 100644 (file)
@@ -41,7 +41,10 @@ class Application(app.Application):
                app.remove_database(deployment)
        
        def install(self, version, options):
+               old_mode = os.stat(".").st_mode
+               os.chmod("config.php", 0777)
                self.install_2(options)
+               os.chmod("config.php", old_mode)
        
        def install_2(self, options):
                database_dict = {