Skip to content

Commit

Permalink
- smart package manager support (http://labix.org/smart)
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Dec 16, 2009
1 parent 395d5d6 commit e4cf19f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/sprinkle/installers/smart.rb
@@ -0,0 +1,29 @@
module Sprinkle
module Installers
class Smart < Installer
attr_accessor :packages #:nodoc:

def initialize(parent, packages, &block) #:nodoc:
super parent, &block
packages = [packages] unless packages.is_a? Array
@packages = packages
end

protected

def install_commands #:nodoc:
"smart install #{@packages.join(' ')} -y 2>&1 | tee -a /var/log/smart-sprinkle"
end
end
end
end

module Sprinkle
module Package
class Package
def smart(*names, &block)
@installer = Sprinkle::Installers::Smart.new(self, *names, &block)
end
end
end
end

0 comments on commit e4cf19f

Please sign in to comment.