From ad06d41a05670934859e50022acddb319b0d8fe1 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Sat, 18 Jan 2014 21:30:02 +0900 Subject: [PATCH] change download timing --- Makefile | 1 - c_src/build.sh | 13 ++++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8fddf94..f2b8218 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ console: compile deps: @$(REBAR) update-deps get-deps - -wget https://github.com/msgpack/msgpack-c/releases/download/cpp-0.5.8/msgpack-0.5.8.tar.gz -P c_src compile: @$(REBAR) compile diff --git a/c_src/build.sh b/c_src/build.sh index fc74ba2..ea3c099 100644 --- a/c_src/build.sh +++ b/c_src/build.sh @@ -1,8 +1,15 @@ #!/bin/sh -if ! test -f c_src/msgpack-0.5.8/src/.libs/libmsgpack.a ; then - tar xzf c_src/msgpack-0.5.8.tar.gz -C c_src - cd c_src/msgpack-0.5.8 +MSGPACK_VERSION=0.5.8 +MSGPACK_TARBALL=msgpack-$MSGPACK_VERSION.tar.gz + +if ! test -f c_src/$MSGPACK_TARBALL ; then + wget https://github.com/msgpack/msgpack-c/releases/download/cpp-0.5.8/msgpack-0.5.8.tar.gz -P c_src +fi + +if ! test -f c_src/$MSGPACK_TARBALL/src/.libs/libmsgpack.a ; then + tar xzf c_src/$MSGPACK_TARBALL -C c_src + cd c_src/msgpack-$MSGPACK_VERSION ./configure make fi