changeset 2494:fa084483fc19

patch tool: check preconditions for init
author Ryan Pavlik <rpavlik@iastate.edu>
date Mon, 07 May 2012 12:55:52 -0500
parents f8ba2ad7cd81
children a681265e116f
files tools/patch-tool-mxe
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/patch-tool-mxe	Mon May 07 12:55:41 2012 -0500
+++ b/tools/patch-tool-mxe	Mon May 07 12:55:52 2012 -0500
@@ -47,6 +47,11 @@
   setupEnv
   cd $gitsdir
 
+  if [ -d $gitsdir/$pkg_subdir ]; then
+    echo "Error: $gitsdir/$pkg_subdir already exists. Cancelling init." >&2
+    exit 1
+  fi
+
   echo "Checking for cached $pkg_file"
   if [ ! -f $mxedir/pkg/$pkg_file ]; then
     make -C "$mxedir" download-$pkg