#!/usr/bin/python

import sys, os
import geet

def readpipe(command):
	print '\033[93m%s\033[32m$\033[0m %s' % (os.getcwd(), command)
	for line in os.popen(command, 'r').xreadlines():
		if line[0] == '#':
			continue
		line = line.strip()
		if len(line) > 0:
			try:
				(key, value) = [i.strip() for i in line.split('=')]
				yield key, value
			except:
				print line

while True:
	try:
		geet.utils.system('/usr/sbin/autobuilder >/var/log/geet-robot/log 2>&1')
	except:
		geet.utils.system('echo Error build >/var/log/geet-robot/log 2>&1')
	geet.utils.system('sleep 1m')
