예제 #1
0
def detect_platform(temp_dir):
	fetcher = Fetcher()
	os.chdir(temp_dir)
	path= fetcher.getResource("resources/probes.tar.gz", temp_dir+"/probes.tar.gz")
	print_console(PROGRAM+"Extracted probes to:"+path)
	untar(path,temp_dir)

	detector = PlatformDetector(temp_dir+"/probes/")
	platform=detector.detect_platform()
	print_console(PROGRAM+"Detected platform as: "+platform)
	ARGS.platform=platform
	
	return platform	
예제 #2
0
def get_version():
	try:
	
		raw_version=urllib2.urlopen(ARGS.VERSION_URL)
		
		ARGS.NEWEST_VERSION=raw_version.read().strip()
	
	except urllib2.HTTPError:
		print_console(PROGRAM+"Detecting version failed. Message:\n"+urllib2.HTTPError.message)
		exit()
	except:
		print_console(PROGRAM+"Could not detect the current version of BIRCH, exiting...")
		exit()

	return ARGS.NEWEST_VERSION