X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=travis%2Fbrotli.sh;h=d23dd19b87a4d9061ccbd22d8a7b08e45d613216;hp=4fec33ea4fd7999c3e65fad55138ecba60070c89;hb=f7bda4412c966a3eb3d930cca798694bb321fa1a;hpb=e3386e9e65eaf7a682ddacbbc3c44ddcd737168f diff --git a/travis/brotli.sh b/travis/brotli.sh index 4fec33e..d23dd19 100755 --- a/travis/brotli.sh +++ b/travis/brotli.sh @@ -1,9 +1,19 @@ #!/bin/bash -git clone https://github.com/google/brotli.git /home/travis/brotli.git -cd /home/travis/brotli.git -git checkout v1.0.2 -./bootstrap -./configure --prefix=/home/travis/brotli -make -j2 -make install +BROTLI_DIR="$with_http_libbrotli_dir" +BROTLI_SRC="$BROTLI_DIR.git" + +if test -n "$BROTLI_DIR" && test "$BROTLI_DIR" != "no"; then + if test -d "$BROTLI_SRC"; then + cd "$BROTLI_SRC" + git pull + else + git clone https://github.com/google/brotli.git "$BROTLI_SRC" + cd "$BROTLI_SRC" + fi + git checkout $1 + ./bootstrap + ./configure -C --prefix="$BROTLI_DIR" + make -j ${JOBS:2} + make install INSTALL=install +fi