Permalink
Browse files

Initialize git repository before going into interactive mode.

  • Loading branch information...
1 parent 5083499 commit 8185a987770941b900a8bd48509d74b51f1c2297 @svetlyak40wt committed Apr 20, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/benchlib/schema.py
View
@@ -18,11 +18,11 @@ def __init__(self, env):
)
def _get_source(self):
- subprocess.call('wget "{0}"'.format(self.url), shell=True)
+ self.call('wget "{0}"'.format(self.url))
files = os.listdir('.')
assert len(files) == 1
- subprocess.call('tar -jxvf "{0}"'.format(files[0]), shell=True)
+ self.call('tar -jxvf "{0}"'.format(files[0]))
os.unlink(files[0])
dirs = os.listdir('.')
@@ -44,21 +44,21 @@ def _install(self, interactive=False):
root = tempfile.mkdtemp(prefix='diy-')
try:
os.chdir(root)
- shell = os.environ['SHELL']
- subprocess.call(shell)
self._get_source()
if interactive:
shell = os.environ['SHELL']
- subprocess.call(shell, shell=True)
+ self.call('git init')
+ self.call('git add -A')
+ self.call(shell)
else:
self.install()
self._symlink()
finally:
- subprocess.call('rm -fr "{0}"'.format(root), shell=True)
+ self.call('rm -fr "{0}"'.format(root))
def _symlink(self):
for dir_name in ['bin', 'sbin', 'etc', 'lib', 'include']:

0 comments on commit 8185a98

Please sign in to comment.