redis_study/build.sh

32 lines
504 B
Bash
Raw Normal View History

2020-09-05 04:01:22 +00:00
#!/usr/bin/env bash
#
# build redis script
#
#make clean
2020-09-12 03:26:10 +00:00
make clean && make PREFIX=/usr/local/redis install
2020-09-05 04:01:22 +00:00
2020-09-12 02:12:54 +00:00
if ! test -z $1;then
return 0;
fi
2020-09-05 04:01:22 +00:00
if [ ! -d "/usr/local/redis/config/" ]
then
mkdir -p /usr/local/redis/config/
fi
# copy conf file
if [ ! -d "/usr/local/redis/config/redis.conf" ]
then
echo "copy redis.conf"
cp ./redis.conf /usr/local/redis/config/
fi
if [ ! -d "/usr/local/redis/config/sentinel.conf" ]
then
echo "copy sentinel.conf"
cp ./sentinel.conf /usr/local/redis/config/
fi