X-Git-Url: http://git.onelab.eu/?p=sliceimage.git;a=blobdiff_plain;f=build.sh;h=4bd4dd2d663a261c1fb34702c9b24372df5bb968;hp=f7db0c9fbc22420d000a37812595524d70272f9f;hb=543702003be6be3b540fd631e634df2ecfe56914;hpb=e68eff749575e7cec6f8f06a74f1de6ca993cd45 diff --git a/build.sh b/build.sh index f7db0c9..4bd4dd2 100755 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ # Mark Huang # Copyright (C) 2004-2005 The Trustees of Princeton University # -# $Id: build.sh,v 1.2 2005/10/01 18:20:08 mlhuang Exp $ +# $Id: build.sh,v 1.3 2006/03/10 18:20:28 mlhuang Exp $ # # Get the production /etc/yum.conf file. XXX When MAs begin deploying @@ -34,6 +34,12 @@ EOF # 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 <