diff options
author | raylu <raylu@cmu.edu> | 2011-05-12 06:29:42 -0400 |
---|---|---|
committer | raylu <raylu@cmu.edu> | 2011-05-12 06:29:42 -0400 |
commit | 418ca3fc0dbeb46b40b5a1682fff19a37ebdd423 (patch) | |
tree | f56038f644a6512053de2268f9ba8c4f042b8d79 | |
parent | 6f470aaf6b99b7a901f1f57ab2e29e85fc89d386 (diff) | |
download | pyc-418ca3fc0dbeb46b40b5a1682fff19a37ebdd423.tar.xz |
Make postinstall more robust
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | postinstall | 7 | ||||
-rw-r--r-- | pyc/urls.py | 1 | ||||
-rw-r--r-- | static/placeholder | 0 |
4 files changed, 7 insertions, 2 deletions
@@ -1,2 +1,3 @@ *.pyc pyc/pyc.db +static/admin diff --git a/postinstall b/postinstall index 28f8e4e..3132c08 100755 --- a/postinstall +++ b/postinstall @@ -10,5 +10,10 @@ admindir = os.path.dirname(django.contrib.admin.__file__) mediadir = os.path.join(admindir, 'media') staticlink = os.path.join('static', 'admin') -if not os.path.islink(staticlink): +if os.path.exists(staticlink): + if not os.path.islink(staticlink): + print "Removing", staticlink + os.unlink(staticlink) + os.symlink(mediadir, staticlink) +else: os.symlink(mediadir, staticlink) diff --git a/pyc/urls.py b/pyc/urls.py index 273f18a..55c42bd 100644 --- a/pyc/urls.py +++ b/pyc/urls.py @@ -4,7 +4,6 @@ from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', - # Examples: # url(r'^$', 'pyc.views.home', name='home'), # url(r'^pyc/', include('pyc.foo.urls')), diff --git a/static/placeholder b/static/placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/static/placeholder |