# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2005 The Trustees of Princeton University
#
-# $Id: buildnode.sh,v 1.3 2005/10/03 14:34:58 mlhuang Exp $
+# $Id: buildnode.sh,v 1.4 2006/03/10 18:20:34 mlhuang Exp $
#
# Get the production /etc/yum.conf file. XXX When MAs begin deploying
# And replace them with a section for the RPMS that were just built
yum-arch $(dirname $RPM_BUILD_DIR)/RPMS
+ createrepo $(dirname $RPM_BUILD_DIR)/RPMS || :
+ # If run under sudo, allow user to delete the headers/ and
+ # repodata/ directories.
+ if [ -n "$SUDO_USER" ] ; then
+ chown -R $SUDO_USER $(dirname $RPM_BUILD_DIR)/RPMS
+ fi
cat >> yum.conf <<EOF
[Bootstrap]
name=Bootstrap RPMS -- $(dirname $RPM_BUILD_DIR)/RPMS/