Last active
August 29, 2015 14:19
-
-
Save tfwio/14f106070625d142f00a to your computer and use it in GitHub Desktop.
Compile WOFF2 compress/decompress mingw32-w64-pthread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function boo () { | |
# vars | |
local WORK_PATH=${PWD} | |
local WOFF2_GIT=https://github.com/google/woff2.git | |
local WOFF2_SHA=2855ee7b8bf6a46ec3a10f773f358c8c0f808b74 | |
# BROTLISHA=f8bfe06821904a8e009577e938682d6522998792 | |
# if you notice a differnt brotli SHA1 when cloning, | |
# you now know why my old scripts broke down. | |
local WOFF2_NAM=woff2-${WOFF2_SHA::9} | |
local WOFF2_DIR=${WORK_PATH}/${WOFF2_NAM} | |
# clone | |
git clone ${WOFF2_GIT} ${WOFF2_NAM} | |
# step into the directory you just cloned | |
pushd ${WOFF2_DIR} | |
# pushd brotli > /dev/null | |
git checkout ${WOFF2_SHA} | |
git submodule init | |
git submodule update | |
# popd > /dev/null | |
# build! | |
CC=gcc.exe LFLAGS="--static -s" make | |
# return to start-path | |
popd > /dev/null | |
# why not | |
unset WORK_PATH | |
unset WOFF2_GIT | |
unset WOFF2_SHA | |
unset WOFF2_NAM | |
unset WOFF2_DIR | |
} | |
boo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function boo () { | |
# vars | |
local WORK_PATH=${PWD} | |
local WOFF2_GIT=https://github.com/google/woff2.git | |
local WOFF2_NAM=woff2 | |
local WOFF2_DIR=${WORK_PATH}/${WOFF2_NAM} | |
## remove existing directory | |
rm -fdr ${WOFF2_DIR} | |
# clone | |
# we don't do recursive to checkout a specific revision (including the submodule) | |
git clone ${WOFF2_GIT} ${WOFF2_NAM} | |
# step into the directory you just cloned | |
pushd ${WOFF2_DIR} | |
# pushd brotli > /dev/null | |
# git checkout ${WOFF2_SHA} | |
git submodule init | |
git submodule update | |
# popd > /dev/null | |
# build! | |
CC=gcc.exe LFLAGS="--static -s" CXXFLAGS="-D__STDC_FORMAT_MACROS" make clean all | |
# return to start-path | |
popd > /dev/null | |
# why not | |
unset WORK_PATH | |
unset WOFF2_GIT | |
unset WOFF2_SHA | |
unset WOFF2_NAM | |
unset WOFF2_DIR | |
} | |
boo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment