Fixed first part launching commands for repo version.

This commit is contained in:
Emiliano Vavassori 2015-09-30 01:34:00 +02:00
parent 92e4e4b0a2
commit 83c0221b43
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python
repover.close()
from subprocess import Popen, PIPE, STDOUT
from os.path import isfile
@ -15,9 +16,9 @@ local_repo_hash = ''
live_repo_hash = ''
# Getting live versions for repo
p = Popen("pushd %s >/dev/null; git log --pretty=oneline -1 | cut -d' ' -f 1; popd > /dev/null" % repo_path, shell=True, stdout=PIPE, stderr=STDOUT)
output = p.communicate()[0]
live_repo_hash = output.strip()
p = Popen("bash -c \"pushd %s >/dev/null; git log --pretty=oneline -1 | cut
-d' ' -f 1; popd > /dev/null\"" % repo_path, shell=True, stdout=PIPE, stderr=STDOUT)
live_repo_hash = p.communicate()[0].strip()
live_pkg_hash = ''
# Recreating pkg checksum