summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 4 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 17ff653..2a78178 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,12 @@
REDIS_RB_VERSION=v3.3.0
-REDIS_RB_TMP_DIR := $(shell mktemp -d)
-REDIS_RB_VENDOR_DIR=lib/vendor
+REDIS_RB_VENDOR_DIR=lib/vendor/redis
PWD=`pwd`
all:
update-redis:
- git clone https://github.com/redis/redis-rb.git $(REDIS_RB_TMP_DIR)
- cd $(REDIS_RB_TMP_DIR); git checkout $(REDIS_RB_VERSION)
- cd $(PWD)
- mkdir -p $(REDIS_RB_VENDOR_DIR)
- cp -r $(REDIS_RB_TMP_DIR)/lib/* $(REDIS_RB_VENDOR_DIR)
- # Adjust all 'require redis/' paths to relative paths
- sed -i.orig -e 's/require "redis/require_relative "redis/g' $(REDIS_RB_VENDOR_DIR)/redis.rb
- find $(REDIS_RB_VENDOR_DIR)/redis -name \*.rb -maxdepth 1 -exec sed -i.orig -e "s/require \"redis\//require_relative \"/g" {} \;
- find $(REDIS_RB_VENDOR_DIR)/redis/connection -name \*.rb -maxdepth 1 -exec sed -i.orig -e 's/require "redis\/connection\//require_relative "/g' *.rb {} \;
- find $(REDIS_RB_VENDOR_DIR)/redis/connection -name \*.rb -maxdepth 1 -exec sed -i.orig -e 's/require "redis\//require_relative "..\//g' *.rb {} \;
+ rm -rf $(REDIS_RB_VENDOR_DIR)
+ git clone -b $(REDIS_RB_VERSION) https://github.com/redis/redis-rb.git $(REDIS_RB_VENDOR_DIR)
+ rm -rf $(REDIS_RB_VENDOR_DIR)/.git
.PHONY=update-redis