Skip to content

Instantly share code, notes, and snippets.

@thoas
Created January 18, 2013 15:08
Show Gist options
  • Save thoas/4565176 to your computer and use it in GitHub Desktop.
Save thoas/4565176 to your computer and use it in GitHub Desktop.
define redis::source(
$version = '2.6.9',
$path = '/usr/local/src',
$bin = '/usr/local/bin',
$owner = 'redis',
$group = 'redis'
) {
exec { "git clone git://github.com/antirez/redis.git redis_${version}":
cwd => "${path}",
path => "${path}/redis_${version}",
creates => "${path}/redis_${version}/.git/HEAD",
before => Exec["make ${version}"]
}
exec { "make ${version}":
cwd => "${path}/redis_${version}",
path => "${path}/redis_${version}",
command => "make && mv src/redis-server ${bin}/ && mv src/redis-cli ${bin}/ && mv src/redis-benchmark ${bin}/ && mv src/redis-check-dump ${bin}/",
creates => "${bin}/redis-server",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment