diff tools/patch-tool-mxe @ 2598:bd76c971f875

patch tool: check preconditions for init
author Ryan Pavlik <rpavlik@iastate.edu>
date Mon, 07 May 2012 12:55:52 -0500
parents 31a737274b4d
children a681265e116f
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