Commits

awsum committed e308f57

update redis recipe

Comments (0)

Files changed (1)

 @target('install','redis')
 def install_redis():
     env = os.environ.copy()
-    sh.git.clone('git://github.com/antirez/redis.git',
-                 '%(HOME)s/opt/redis' % env)
-    sh.cd('%(HOME)s/opt/redis' % env)
-    sh.make()
-    sh.ln('-si', '%(HOME)s/opt/redis/src/redis-server' % env,
+    temp_dir = mkdtemp()
+    sh.git.clone('git://github.com/antirez/redis.git', temp_dir)
+    sh.make('-C', temp_dir)
+    sh.make('-C', temp_dir, 'install', 'PREFIX=%(HOME)s/opt/redis' % env)
+    sh.ln('-s', '%(HOME)s/opt/redis/bin/redis-server' % env,
                  '%(HOME)s/bin/redis-server' % env)
-    sh.ln('-si', '%(HOME)s/opt/redis/src/redis-cli' % env,
+    sh.ln('-s', '%(HOME)s/opt/redis/bin/redis-cli' % env,
                  '%(HOME)s/bin/redis-cli' % env)
+    rmtree(temp_dir)
 
 @target('install','vcprompt')
 def install_vcprompt():
-    #TODO check if ~/bin/vcprompt exists
     env = os.environ.copy()
     temp_dir = mkdtemp()
     sh.hg.clone('https://bitbucket.org/gward/vcprompt/',