#!/usr/bin/env python
import os.path, sys

if not os.path.isfile('/etc/mock/default.cfg'):
	sys.stderr.write("This does not seem to be a Red Hat compatible OS.\n")
	exit(1)

vars = { 'config_opts': {} }
execfile("/etc/mock/default.cfg", vars)
arch = vars['config_opts']['target_arch']
if arch == 'i386' or arch == 'i586' or arch == 'i686':
  print('i386')
else:
  print(arch)