From 4b301cf46e46d5393710a974f56229d9b4dfa479 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Fri, 13 Nov 2009 23:09:13 +0000 Subject: [PATCH] add mklocalrepo.sh to build script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4574 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- buildcore.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/buildcore.sh b/buildcore.sh index 3ffc25c8c..b4c5e3838 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -156,7 +156,7 @@ if $GREP -E '^[UAD] +xCAT/' $SVNUP; then fi # Decide if anything was built or not -if [ $UPLOAD == 0 ]; then +if [ $UPLOAD == 0 -a "$UP" != 1 ]; then echo "Nothing new detected" exit 0; fi @@ -215,6 +215,15 @@ gpgcheck=1 gpgkey=http://xcat.sourceforge.net/yum/$REL/$CORE/repodata/repomd.xml.key EOF +# Create the mklocalrepo script +cat >mklocalrepo.sh << 'EOF2' +#!/bin/sh +cd `dirname $0` +REPOFILE=`basename xCAT-*.repo` +sed -e 's|baseurl=.*|baseurl=file://'`pwd`'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'`pwd`'/repodata/repomd.xml.key|' > /etc/yum.repos.d/$REPOFILE +cd - +EOF2 + #if [ "$PROMOTE" = 1 ]; then # sed -e 's|/core-snap|/xcat-core|' xCAT-core.repo > xCAT-core.repo.new # mv -f xCAT-core.repo.new xCAT-core.repo