changeset 2493:f8ba2ad7cd81

patch tool: check preconditions for export
author Ryan Pavlik <rpavlik@iastate.edu>
date Mon, 07 May 2012 12:55:41 -0500
parents b48e499007b7
children fa084483fc19
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:30 2012 -0500
+++ b/tools/patch-tool-mxe	Mon May 07 12:55:41 2012 -0500
@@ -73,6 +73,11 @@
 
 function export_patch {
   setupEnv
+  if [ ! -d $gitsdir/$pkg_subdir ]; then
+    echo "Error: $gitsdir/$pkg_subdir does not exist, so cannot export patches. Cancelling export." >&2
+    exit 1
+  fi
+
   cd $gitsdir/$pkg_subdir && \
   (
     echo 'This file is part of MXE.'