Plugins can now declare separate css and js files.

This commit is contained in:
tonio
2010-06-15 11:24:44 +02:00
parent 3ae122fe39
commit 5f51ee4412
29 changed files with 374 additions and 6573 deletions
+13
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
import glob
from django.conf import settings
def usage():
@@ -16,6 +17,18 @@ def update_extension(name, extdir, state):
or "rm %s/%s" % (d, name)
os.system(cmd)
staticpath = "%s/%s" % (extdir, "static")
if os.path.isdir(staticpath):
for d in ['css', 'js']:
subpath = "%s/%s" % (staticpath, d)
if not os.path.isdir(subpath):
continue
for f in glob.glob("%s/*.%s" % (subpath, d)):
cmd = state == "on" \
and "ln -s %s static/%s" % (f, d) \
or "rm static/%s/%s" % (d, os.path.basename(f))
os.system(cmd)
if __name__ == "__main__":
if len(sys.argv) != 3:
usage()