[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
Luke Kanies
luke at puppetlabs.com
Wed Jul 14 10:32:16 UTC 2010
The following commit has been merged in the upstream branch:
commit edef6478e0cc47c0d2db0198fcc54897f85657bb
Author: Luke Kanies <luke at puppetlabs.com>
Date: Fri Apr 9 15:49:23 2010 -0700
Fixing 'puppet' to directly run manifests
It was previously requiring that you specify an application
name, thus breaking the ability to easily run commands like:
puppet ~/bin/test.pp
Or even having '#/usr/bin/env puppet --verbose' in the first
line of an executable script and having that work.
Signed-off-by: Luke Kanies <luke at puppetlabs.com>
diff --git a/bin/puppet b/bin/puppet
index f229898..cffa891 100755
--- a/bin/puppet
+++ b/bin/puppet
@@ -7,7 +7,12 @@ builtins = Dir[File.join(absolute_appdir, '*.rb')].map{|fn| File.basename(fn, '.
usage = "Usage: puppet command <space separated arguments>"
available = "Available commands are: #{builtins.sort.join(', ')}"
-command_name = ARGV.empty? || ARGV.first[/^-/] ? nil : ARGV.shift # subcommand?
+command_name = ARGV.empty? || ARGV.first[/^-/] || ARGV.first =~ /\.pp/ || ARGV.first =~ /\.rb/ ? nil : ARGV.shift # subcommand?
+
+if command_name.nil? # It's old-style puppet, executing something
+ command_name = "main"
+end
+
if command_name.nil? # main
puts usage, available
elsif builtins.include?(command_name) #subcommand
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list