2016-11-02 20:56:25 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-02-25 20:32:33 -08:00
|
|
|
set -x
|
|
|
|
|
2016-11-02 20:56:25 -07:00
|
|
|
# Cause the script to exit if a single command fails.
|
|
|
|
set -e
|
|
|
|
|
2018-03-01 14:29:56 -08:00
|
|
|
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)/../
|
|
|
|
|
|
|
|
if [ ! -f $TP_DIR/pkg/redis/src/redis-server ]; then
|
2019-01-29 19:19:05 -08:00
|
|
|
redis_vname="5.0.3"
|
2016-11-21 15:02:40 -08:00
|
|
|
# This check is to make sure the tarball has been fully extracted. The only
|
|
|
|
# relevant bit about redis/utils/whatisdoing.sh is that it is one of the last
|
|
|
|
# files in the tarball.
|
2018-03-01 14:29:56 -08:00
|
|
|
if [ ! -f $TP_DIR/pkg/redis/utils/whatisdoing.sh ]; then
|
|
|
|
mkdir -p "$TP_DIR/pkg/redis"
|
|
|
|
curl -sL "https://github.com/antirez/redis/archive/$redis_vname.tar.gz" | tar xz --strip-components=1 -C "$TP_DIR/pkg/redis"
|
2016-11-21 15:02:40 -08:00
|
|
|
fi
|
2018-03-01 14:29:56 -08:00
|
|
|
pushd $TP_DIR/pkg/redis
|
2016-09-18 13:57:27 -07:00
|
|
|
make
|
2018-03-01 14:29:56 -08:00
|
|
|
popd
|
2016-09-18 13:57:27 -07:00
|
|
|
fi
|