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
|
|
|
|
|
2016-11-21 15:02:40 -08:00
|
|
|
if [ ! -f redis/src/redis-server ]; then
|
2016-12-11 17:40:19 -08:00
|
|
|
redis_vname="4.0-rc2"
|
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.
|
|
|
|
if [ ! -f redis/utils/whatisdoing.sh ]; then
|
2018-02-25 20:32:33 -08:00
|
|
|
mkdir -p "./redis"
|
|
|
|
curl -sL "https://github.com/antirez/redis/archive/$redis_vname.tar.gz" | tar xz --strip-components=1 -C "./redis"
|
2016-11-21 15:02:40 -08:00
|
|
|
fi
|
|
|
|
cd redis
|
2016-09-18 13:57:27 -07:00
|
|
|
make
|
|
|
|
fi
|