From 0af7d4a2b4da6e949b7c2fd1554f6196d3ba0f76 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 29 Mar 2006 17:02:00 +0000 Subject: [PATCH] - fix cases when yum-arch and/or createrepo don't exist --- build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 63e9bbe..c869ec5 100755 --- a/build.sh +++ b/build.sh @@ -241,8 +241,17 @@ if [ -n "$RPM_BUILD_DIR" ] ; then install -D -m 644 $RPM_RPMS_DIR/yumgroups.xml \ $data/var/www/html/install-rpms/planetlab/yumgroups.xml fi - yum-arch $data/var/www/html/install-rpms/planetlab || : - createrepo $data/var/www/html/install-rpms/planetlab || : + # yum-2.0.x + if [ -x /usr/bin/yum-arch ] ; then + yum-arch $data/var/www/html/install-rpms/planetlab + fi + # yum-2.4.x + if [ -x /usr/bin/createrepo ] ; then + if [ -f $data/var/www/html/install-rpms/planetlab/yumgroups.xml ] ; then + groupfile="-g yumgroups.xml" + fi + createrepo $groupfile $data/var/www/html/install-rpms/planetlab + fi fi # Bootstrap the system for quicker startup (and to populate the -- 2.47.0