Skip to contentSkip to conversation

Check for non-existent local repo

PATCH In review Aron Griffis 2 participants 2 messages Jun 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Check for non-existent local repo

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.

buildconfigs/select-repository +7 -3
diff -r 7a16a499152c -r c415a482b40e buildconfigs/select-repository
@@ -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
#1 lore raw
Quoted 7 lines · Aron Griffis

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.

Applies, thanks.

Ian.