On 07/12/2011 06:19 AM, Al @ Lab42 wrote:
command => "mkdir -p $destination_dir ; cd $destination_dir ; $extract_command $work_dir/$source_filename",
Nice. But I would suggest changing ';' to '&&'. That way, if the mkdir or cd fail you don't end up
trying to extract the archive in the wrong directory.

command => "mkdir -p $destination_dir && cd $destination_dir && $extract_command $work_dir/$source_filename",

Also consider

      unless => "test -d ${destination_dir }/${extracted_dir}",

or even better

      creates => "${destination_dir }/${extracted_dir}",

for the repetition guard.

--
vagn

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to