forked from sprinkle-tool/sprinkle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- smart package manager support (http://labix.org/smart)
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |