summaryrefslogtreecommitdiffstats
path: root/tools/patch-tool-mxe
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patch-tool-mxe')
-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 -