methods/pk_client.rb
# Copy package from package directory to packer client directory
Copy package from package directory to packer client directory
Copy package from package directory to packer client directory
def copy_pkg_to_packer_client(pkg_name,options)
  if not pkg_name.match(/$pkg_base_dir/)
    source_pkg = $pkg_base_dir+"/"+pkg_name
  else
    source_pkg = pkg_name
  end
  if not File.exist?(source_pkg)
    handle_output(options,"Warning:\tPackage #{source_pkg} does not exist")
    quit(options)
  end
  if not File.exist?(dest_pkg)
    dest_pkg = options['clientdir']+"/"+pkg_name
    message  = "Information:\tCopying '"+source_pkg+"' to '"+dest_pkg+"'"
    command  = "cp #{source_pkg} #{dest_pkg}"
    execute_command(options,message,command)
  end
  return
end
def copy_pkg_to_packer_client ( pkg_name , options ) if not pkg_name . match ( / $pkg_base_dir / ) source_pkg = $pkg_base_dir + "/" + pkg_name else source_pkg = pkg_name end if not File . exist? ( source_pkg ) handle_output ( options , "Warning:\tPackage #{source_pkg} does not exist" ) quit ( options ) end if not File . exist? ( dest_pkg ) dest_pkg = options [ 'clientdir' ] + "/" + pkg_name message = "Information:\tCopying '" + source_pkg + "' to '" + dest_pkg + "'" command = "cp #{source_pkg} #{dest_pkg}" execute_command ( options , message , command ) end return end
Copy package from package directory to packer client directory
Copy package from package directory to packer client directory
pkg_name
<not_specific>
options
<not_specific>