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 /postinstall | |
parent | 6f470aaf6b99b7a901f1f57ab2e29e85fc89d386 (diff) | |
download | pyc-418ca3fc0dbeb46b40b5a1682fff19a37ebdd423.tar.xz |
Make postinstall more robust
Diffstat (limited to 'postinstall')
-rwxr-xr-x | postinstall | 7 |
1 files changed, 6 insertions, 1 deletions
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) |