Permalink
Browse files

Append name to MOZ_OBJDIR line and not first line in mozconfig

  • Loading branch information...
unknown authored and ahal committed Dec 21, 2011
1 parent e68a9e5 commit 88c13eec5e47e64263e50e683e33af6c975c55c3
Showing with 3 additions and 5 deletions.
  1. +3 −5 mozconfigwrapper/mozconfig.py
@@ -9,10 +9,7 @@
"""
here = os.path.dirname(os.path.realpath(__file__))
-mozconfigdir = os.getenv('BUILDWITH_HOME', '')
-if mozconfigdir == '':
- mozconfigdir = os.path.expanduser("~/.mozconfigs")
-
+mozconfigdir = os.getenv('BUILDWITH_HOME', os.path.expanduser("~/.mozconfigs"))
special_files = ['.template', '.active']
def mkmozconfig(name):
@@ -28,7 +25,8 @@ def mkmozconfig(name):
f = open(mozconfig, 'r')
lines = f.readlines()
f.close()
- lines[0] = lines[0].rstrip() + name + '\n'
+ lines = [line.rstrip() + name + '\n' if line.find("MOZ_OBJDIR") != -1
+ else line for line in lines]
f = open(mozconfig, 'w')
f.writelines(lines)
f.close()

0 comments on commit 88c13ee

Please sign in to comment.