summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-08-02 02:41:37 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2014-08-02 02:41:37 (GMT)
commit8b2e5e1bacf52d75c7083bb20034fd764eb4e539 (patch)
treeac988113a8b674a724a9ecfc570518a423f40e58 /Makefile
parent270f686e9302adde931726337c58b421840cebb0 (diff)
downloadmxe-8b2e5e1bacf52d75c7083bb20034fd764eb4e539.zip
mxe-8b2e5e1bacf52d75c7083bb20034fd764eb4e539.tar.gz
mxe-8b2e5e1bacf52d75c7083bb20034fd764eb4e539.tar.bz2
Fix GitHub update routine
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0b261af..1540d5a 100644
--- a/Makefile
+++ b/Makefile
@@ -77,6 +77,12 @@ MAKE_SHARED_FROM_STATIC = \
--libdir '$(PREFIX)/$(TARGET)/lib' \
--bindir '$(PREFIX)/$(TARGET)/bin'
+define MXE_GET_GITHUB_SHA
+ $(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/heads/$(strip $(2))' | \
+ $(SED) -n 's#.*"sha": "\([^<]\{7\}\)[^<]\{3\}.*#\1#p' | \
+ head -1
+endef
+
# use a minimal whitelist of safe environment variables
ENV_WHITELIST := PATH LANG MAKE% MXE% %PROXY %proxy
unexport $(filter-out $(ENV_WHITELIST),$(shell env | cut -d '=' -f1))