]> jfr.im git - irc/quakenet/newserv.git/commitdiff
BUILD: improve workspace mechanism
authorChris Porter <redacted>
Mon, 2 Feb 2015 01:02:49 +0000 (01:02 +0000)
committerChris Porter <redacted>
Mon, 2 Feb 2015 01:02:49 +0000 (01:02 +0000)
configure
configure.ini
workspaces.ini [deleted file]

index 6538c54e9eccf571cd0b6c15ec83900e46c55e83..d1f2868eaf333268565e2bd10a2494b50cef7e3b 100755 (executable)
--- a/configure
+++ b/configure
@@ -342,24 +342,23 @@ def usage():
   print "    -m [additional module]"
   print "    -v: verbose"
 
-def main(workspacesfile):
+def main():
   global LOG, VERBOSE
 
-  workspacesconfig = IniParser(open(workspacesfile, "r"))
+  files, workspaces = [], []
+  for root, _, file_list in os.walk("."):
+    if "configure.ini" not in file_list:
+      continue
 
-  files = []
-  workspaces = []
+    print "found workspace: %s" % root
+    workspaces.append(root)
 
-  for workspace in ["."] + workspacesconfig["workspaces"].keys():
-    path = workspace + "/configure.ini"
-    if os.path.exists(path):
-      print "found workspace: %s" % workspace
-      workspaces.append(workspace)
-      files.append( (workspace, open(path, "r")) )
+    path = os.path.join(root, "configure.ini")
+    files.append( (root, open(path, "r")) )
 
-      local_path = workspace + "/configure.ini.local"
-      if os.path.exists(local_path):
-        files.append( (workspace, open(local_path, "r")) )
+    local_path = os.path.join(root, "configure.ini.local")
+    if os.path.exists(local_path):
+      files.append( (root, open(local_path, "r")) )
 
   config = MultiConfigureIniParser(files)
 
@@ -412,4 +411,4 @@ def main(workspacesfile):
   configure(config, overrides, workspaces)
 
 if __name__ == "__main__":
-  main("workspaces.ini")
+  main()
index 69ebb000390b1b10ad077e04f8e987e7b0c717d7..a8ccf342f6abb3775d86efe65d0ad7ab3a399865 100644 (file)
@@ -31,7 +31,6 @@ carrot=
 horse=
 newsearch=pcre
 trojanscan=mysql pcre
-silly=
 tutorbot=
 fsck=
 nterfacer=pcre
@@ -58,7 +57,6 @@ nsmstats=
 serverlist=pcre
 patricia=
 sqlite=sqlite
-log=
 usercount=
 patricianick=
 patriciasearch=
diff --git a/workspaces.ini b/workspaces.ini
deleted file mode 100644 (file)
index ee4cbb9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# There's an implicit workspace for "."
-
-[workspaces]
-quakenet=