This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| bf02c9eb » | crafterm | 2008-05-30 | 1 | module Sprinkle | |
| 2 | module Installers | ||||
| 33c10a3a » | mitchellh | 2008-07-19 | 3 | # = RPM Package Installer | |
| 4 | # | ||||
| 5 | # The RPM package installer installs RPM packages. | ||||
| 6 | # | ||||
| 7 | # == Example Usage | ||||
| 8 | # | ||||
| 9 | # Installing the magic_beans RPM. Its all the craze these days. | ||||
| 10 | # | ||||
| 11 | # package :magic_beans do | ||||
| 12 | # rpm 'magic_beans' | ||||
| 13 | # end | ||||
| 14 | # | ||||
| 15 | # You may also specify multiple rpms as an array: | ||||
| 16 | # | ||||
| 17 | # package :magic_beans do | ||||
| 18 | # rpm %w(magic_beans magic_sauce) | ||||
| 19 | # end | ||||
| bf02c9eb » | crafterm | 2008-05-30 | 20 | class Rpm < Installer | |
| 33c10a3a » | mitchellh | 2008-07-19 | 21 | attr_accessor :packages #:nodoc: | |
| bf02c9eb » | crafterm | 2008-05-30 | 22 | ||
| 33c10a3a » | mitchellh | 2008-07-19 | 23 | def initialize(parent, packages, &block) #:nodoc: | |
| bf02c9eb » | crafterm | 2008-05-30 | 24 | super parent, &block | |
| 25 | packages = [packages] unless packages.is_a? Array | ||||
| 26 | @packages = packages | ||||
| 27 | end | ||||
| 28 | |||||
| 29 | protected | ||||
| 30 | |||||
| 33c10a3a » | mitchellh | 2008-07-19 | 31 | def install_commands #:nodoc: | |
| b26a9377 » | crafterm | 2008-07-12 | 32 | "rpm -Uvh #{@packages.join(' ')}" | |
| 33 | end | ||||
| bf02c9eb » | crafterm | 2008-05-30 | 34 | ||
| 35 | end | ||||
| 36 | end | ||||
| 37 | end | ||||








