Commit 9b5b6c99 authored by Tim Brooks's avatar Tim Brooks
Browse files

Create dev_serve symlink

parent 6897851f
...@@ -1839,8 +1839,7 @@ def create_bootstrap_script(extra_text, python_version=''): ...@@ -1839,8 +1839,7 @@ def create_bootstrap_script(extra_text, python_version=''):
return content.replace('##EXT' 'END##', extra_text) return content.replace('##EXT' 'END##', extra_text)
import os, subprocess, textwrap import os, subprocess
from os.path import join
def after_install(options, home_dir): def after_install(options, home_dir):
dirs = ['log', 'uploads', 'renders'] dirs = ['log', 'uploads', 'renders']
for folder in dirs: for folder in dirs:
...@@ -1860,6 +1859,11 @@ def after_install(options, home_dir): ...@@ -1860,6 +1859,11 @@ def after_install(options, home_dir):
print("Error installing mcviz.web") print("Error installing mcviz.web")
return return
try:
os.symlink("env/bin/mcwebviz", "dev_serve")
except OSError:
pass
print("") print("")
print("Check the user running apache can access these folders") print("Check the user running apache can access these folders")
print("e.g. > chown ${USER}:www-data log uploads renders") print("e.g. > chown ${USER}:www-data log uploads renders")
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
import virtualenv, textwrap import virtualenv, textwrap
OUTPUT = virtualenv.create_bootstrap_script(textwrap.dedent(""" OUTPUT = virtualenv.create_bootstrap_script(textwrap.dedent("""
import os, subprocess, textwrap import os, subprocess
from os.path import join
def after_install(options, home_dir): def after_install(options, home_dir):
dirs = ['log', 'uploads', 'renders'] dirs = ['log', 'uploads', 'renders']
for folder in dirs: for folder in dirs:
...@@ -24,6 +23,11 @@ def after_install(options, home_dir): ...@@ -24,6 +23,11 @@ def after_install(options, home_dir):
print("Error installing mcviz.web") print("Error installing mcviz.web")
return return
try:
os.symlink("env/bin/mcwebviz", "dev_serve")
except OSError:
pass
print("") print("")
print("Check the user running apache can access these folders") print("Check the user running apache can access these folders")
print("e.g. > chown ${USER}:www-data log uploads renders") print("e.g. > chown ${USER}:www-data log uploads renders")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment