#!/bin/bash
# make the tccustomize rpm for booting and customizing XO's 1-4
# must be run as root

# but also need a non root user to make the rpm
nonroot=ghunt

#fetch the script to build the application
if ! [ -d mktinycorexo ]; then
	git clone http://dev.laptop.org/~quozl/mktinycorexo/.git
fi
pushd mktinycorexo
if ! [ -d output ]; then
	./mktinycorexo --xo-custom 
fi
popd

# bad form, and dangerous to build rpms as root
su $nonroot -c "rpmbuild -ba tccustomize.spec"
