From 418ca3fc0dbeb46b40b5a1682fff19a37ebdd423 Mon Sep 17 00:00:00 2001 From: raylu Date: Thu, 12 May 2011 06:29:42 -0400 Subject: Make postinstall more robust --- postinstall | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'postinstall') 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) -- cgit v1.2.3