aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs/select-repository
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2007-06-05 15:52:46 +0100
committerIan Campbell <ian.campbell@xensource.com>2007-06-05 15:52:46 +0100
commitf1356ca4e0f7fd7815099075d589ef297041fe79 (patch)
treeda175aaa4cf47918f30d4858073c2007ff98ef98 /buildconfigs/select-repository
parent7e8362e834c21f137d64f18bc7d559940977127c (diff)
downloadxen-f1356ca4e0f7fd7815099075d589ef297041fe79.tar.gz
xen-f1356ca4e0f7fd7815099075d589ef297041fe79.tar.bz2
xen-f1356ca4e0f7fd7815099075d589ef297041fe79.zip
[PATCH] Check for non-existent local repo
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 <aron@hp.com>
Diffstat (limited to 'buildconfigs/select-repository')
-rwxr-xr-xbuildconfigs/select-repository10
1 files changed, 7 insertions, 3 deletions
diff --git a/buildconfigs/select-repository b/buildconfigs/select-repository
index ef1df59ac3..d32db069f3 100755
--- a/buildconfigs/select-repository
+++ b/buildconfigs/select-repository
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
ME=$(basename $0)
@@ -39,10 +39,14 @@ if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
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