diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-08-02 02:41:37 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-08-02 02:41:37 (GMT) |
commit | 8b2e5e1bacf52d75c7083bb20034fd764eb4e539 (patch) | |
tree | ac988113a8b674a724a9ecfc570518a423f40e58 /Makefile | |
parent | 270f686e9302adde931726337c58b421840cebb0 (diff) | |
download | mxe-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-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)) |