Commit 48cd13fe authored by Antoine Catton's avatar Antoine Catton

Git init, specify description

parent 1c95057c
...@@ -36,10 +36,14 @@ class Recipe(GenericBaseRecipe): ...@@ -36,10 +36,14 @@ class Recipe(GenericBaseRecipe):
def install(self): def install(self):
repolist = json.loads(self.options['repos']) repolist = json.loads(self.options['repos'])
for repo in repolist: for repo, desc in repolist.iteritems():
absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo) absolute_path = os.path.join(self.options['base-directory'], '%s.git' % repo)
if not os.path.exists(absolute_path): if not os.path.exists(absolute_path):
check_call([self.options['git-binary'], 'init', check_call([self.options['git-binary'], 'init',
'--bare', absolute_path]) '--bare', absolute_path])
# XXX: Hardcoded path
description_filename = os.path.join(absolute_path, 'description')
with open(description_filename, 'w') as description_file:
description_file.write(desc)
return [] return []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment