summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorViktor Szakats <vszakats@users.noreply.github.com>2017-03-14 18:07:49 (GMT)
committerViktor Szakats <vszakats@users.noreply.github.com>2017-03-14 20:50:23 (GMT)
commitf91b7de2dd1500a3985f3b9e9bf2c56b4add4e3c (patch)
tree1ec86b8d6bd5254e0e713c62b7d79d5e72b6c330 /tools
parente1471ec0552d0bd5c2bb22dfa29d196e97fc4d95 (diff)
downloadmxe-f91b7de2dd1500a3985f3b9e9bf2c56b4add4e3c.zip
mxe-f91b7de2dd1500a3985f3b9e9bf2c56b4add4e3c.tar.gz
mxe-f91b7de2dd1500a3985f3b9e9bf2c56b4add4e3c.tar.bz2
add option to install Linux packages as well
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mxe-get16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/mxe-get b/tools/mxe-get
index b9ec5ff..6f5a764 100755
--- a/tools/mxe-get
+++ b/tools/mxe-get
@@ -15,10 +15,11 @@ Environment:
MXE_HOME Configure directory where packages will be installed.
Default: ~/mxe
-MXE_DONT_INSTALL Comma/space separated list of package names to skip
+MXE_SKIP_INSTALL Comma/space separated list of package names to skip
installing. Useful to exclude unnecessary dependencies.
*-linux-gnu-*, mxe-requirements, mxe-source packages
are excluded automatically.
+MXE_INST_LINUX Install 'linux-gnu' packages. Default: no
Required: ar (BSD), gpg, curl, openssl, awk, sed, tar, gzip
@@ -37,11 +38,11 @@ mxe_get_pkg() {
plat="${BASH_REMATCH[4]}" # mingw32 | linux-gnu
name="${BASH_REMATCH[6]}" # harfbuzz
- # skip native packages
- if [ ! "${plat}" = 'linux-gnu' ]; then
+ # skip Linux packages by default
+ if [ ! "${plat}" = 'linux-gnu' ] || [ "${MXE_INST_LINUX}" = 'yes' ]; then
- # skip packages on the don't install list
- if [[ ! "${name}" =~ ^("${MXE_DONT_INSTALL//[, ]/|}")$ ]]; then
+ # skip packages on the skip install list
+ if [[ ! "${name}" =~ ^("${MXE_SKIP_INSTALL//[, ]/|}")$ ]]; then
idid="${repo}-${name}" # package id for internal purposes
if [[ ! "${done}" = *"|${idid}|"* ]]; then # avoid installing the same package twice
@@ -83,7 +84,7 @@ mxe_get_pkg() {
mxe_get_pkg "$i" # recurse
done
else
- echo "! Error: Cannot find file in file list: '${repo}-${name}_*'"
+ echo "! Error: Download failed."
fi
fi
fi
@@ -99,7 +100,8 @@ if [ $# -eq 0 ]; then
exit
fi
-[ -z "${MXE_DONT_INSTALL+x}" ] && MXE_DONT_INSTALL='gcc'
+[ -z "${MXE_SKIP_INSTALL+x}" ] && MXE_SKIP_INSTALL='gcc'
+[ -z "${MXE_INST_LINUX+x}" ] && MXE_INST_LINUX='no'
[ -z "${MXE_HOME+x}" ] && MXE_HOME="${HOME}/mxe"
mkdir -p "${MXE_HOME}"