changeset 2490:0db1b21402e9

patch tool: Check for package file, and if it's not there, use makefile to grab it.
author Ryan Pavlik <rpavlik@iastate.edu>
date Mon, 07 May 2012 12:44:38 -0500
parents 2f3353b7a313
children 14be80e4c69f
files tools/patch-tool-mxe
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/patch-tool-mxe	Mon May 07 12:41:32 2012 -0500
+++ b/tools/patch-tool-mxe	Mon May 07 12:44:38 2012 -0500
@@ -46,6 +46,13 @@
 function init_git {
   setupEnv
   cd $gitsdir
+  if [ ! -f $mxedir/pkg/$pkg_file ]; then
+    make -C "$mxedir" download-$pkg
+    if [ ! $? -eq 0 ]; then
+      echo "Could not build target download-$pkg - cancelling init." >&2
+      exit 1
+    fi
+  fi
   echo $pkg_file | grep "\.tar\.gz"  >> /dev/null && tar xf $mxedir/pkg/$pkg_file
   echo $pkg_file | grep "\.tar\.bz2" >> /dev/null && tar xf $mxedir/pkg/$pkg_file
   echo $pkg_file | grep "\.tar\.xz"  >> /dev/null && xz -dc $mxedir/pkg/$pkg_file | tar xf -