summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2012-05-07 17:44:38 (GMT)
committerMark Brand <mabrand@mabrand.nl>2012-06-13 16:22:32 (GMT)
commitcef822954cc43c40f169438c1093b434a8410cb4 (patch)
treec45fe98ed9a115b089d626e557b5295ea0cc4cd6 /tools
parent42e321a85a776f1c2737211107b408ac056628c6 (diff)
downloadmxe-cef822954cc43c40f169438c1093b434a8410cb4.zip
mxe-cef822954cc43c40f169438c1093b434a8410cb4.tar.gz
mxe-cef822954cc43c40f169438c1093b434a8410cb4.tar.bz2
patch tool: Check for package file, and if it's not there, use makefile to grab it.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/patch-tool-mxe7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/patch-tool-mxe b/tools/patch-tool-mxe
index 07bd9f6..e2f5e4c 100755
--- a/tools/patch-tool-mxe
+++ b/tools/patch-tool-mxe
@@ -46,6 +46,13 @@ setupEnv() {
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 -