Other than the weird indentation, +1

On Aug 6, 2009, at 9:45 PM, James Turnbull wrote:

>
>
> Signed-off-by: James Turnbull <[email protected]>
> ---
> tasks/rake/pcm.rake |   35 +++++++++++++++++++++++++++++++++++
> 1 files changed, 35 insertions(+), 0 deletions(-)
> create mode 100644 tasks/rake/pcm.rake
>
> diff --git a/tasks/rake/pcm.rake b/tasks/rake/pcm.rake
> new file mode 100644
> index 0000000..e52e3e4
> --- /dev/null
> +++ b/tasks/rake/pcm.rake
> @@ -0,0 +1,35 @@
> +namespace :pcm do
> +
> +begin
> +    git = %x{which git}
> +rescue
> +    puts "You need git installed to use the Puppet Common modules"
> +end
> +
> +repo = "git://github.com/puppet-modules/puppet-manifests.git"
> +path = "/etc/puppet"
> +
> +    desc "Load Puppet Common Modules"
> +    task :load do
> +        if File.exists?(path) && File.directory?(path)
> +            puts "The #{path} already exists - exiting"
> +            exit 1
> +        else
> +            `git clone #{repo} #{path}`
> +            Dir.chdir(path)
> +            `git submodule init`
> +            `git submodule update`
> +        end
> +    end
> +
> +    desc "Update Puppet Common Modules"
> +    task :update do
> +        if File.exists?(path) && File.directory?(path)
> +            Dir.chdir(path)
> +            `git pull origin`
> +            `git submodule update`
> +        else
> +            exit 0
> +        end
> +    end
> +end
> --  
> 1.6.0.6
>
>
> >


-- 
Sometimes I think we're alone. Sometimes I think we're not. In
either case, the thought is staggering. --R. Buckminster Fuller
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to