From: Aron Griffis Subject: [PATCH] Check for non-existent local repo Date: Tue, 5 Jun 2007 10:18:04 -0400 Message-ID: <20070605141803.GA27222@fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This applies to xen-staging.hg Check for non-existent local clone in select-repository. Also change the #!/bin/bash to #!/bin/sh since the Makefile is calling it explicitly with sh, and fix a couple other typos. Signed-off-by: Aron Griffis diff -r 7a16a499152c -r c415a482b40e buildconfigs/select-repository --- a/buildconfigs/select-repository Mon Jun 04 17:09:12 2007 +0100 +++ b/buildconfigs/select-repository Tue Jun 05 08:07:50 2007 -0600 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ME=$(basename $0) @@ -39,9 +39,13 @@ fi fi BASE=$(dirname ${XEN}) -if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then - echo "$ME: Unable to determine Xen repository parent." 1>&2 +if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then + echo "$ME: Unable to determine Xen repository base." 1>&2 exit 1; +fi +if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then + echo "$ME: No such dir: $BASE/$REPO" 1>&2 + exit 1 fi echo "$ME: Found ${BASE}/${REPO}" 1>&2