Update ark cookbook

This commit is contained in:
Greg Karékinian
2017-02-24 16:05:31 +01:00
parent 6075167494
commit af1718e44a
19 changed files with 310 additions and 101 deletions

View File

@@ -12,18 +12,16 @@ module Ark
"unzip -j -q -o \"#{resource.release_file}\" -d \"#{resource.path}\""
end
# rubocop:disable Metrics/AbcSize
def cherry_pick
cmd = "unzip -t #{resource.release_file} \"*/#{resource.creates}\" ; stat=$? ;"
cmd += "if [ $stat -eq 11 ] ; then "
cmd += 'if [ $stat -eq 11 ] ; then '
cmd += "unzip -j -o #{resource.release_file} \"#{resource.creates}\" -d #{resource.path} ;"
cmd += "elif [ $stat -ne 0 ] ; then false ;"
cmd += "else "
cmd += 'elif [ $stat -ne 0 ] ; then false ;'
cmd += 'else '
cmd += "unzip -j -o #{resource.release_file} \"*/#{resource.creates}\" -d #{resource.path} ;"
cmd += "fi"
cmd += 'fi'
cmd
end
# rubocop:enable Metrics/AbcSize
def initialize(resource)
@resource = resource