- run createrepo as well
[bootcd.git] / build.sh
index 3f0ba78..472cd13 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -110,6 +110,13 @@ EOF
    # the yum configuration. This cooperates with the PlanetLab build
    # system.
    if [ -n "$RPM_BUILD_DIR" ] ; then
+       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/