如果没有bash运算符,我们如何实现它

时间:2017-04-18 17:10:25

标签: chef chef-recipe chef-solo test-kitchen

我们如何使用任何资源

更改此bash运算符

我正在将特定目录移动到特定目录

bash " deploy" do
  cwd "#{stage}"
  code <<-EOH
    cp -pr "#{stage}/#{name}-#{package_version}.tar"  "#{stage_operator}/"
    tar xvf "#{stage}/#{name}-#{package_version}.tar"

    mv  #{stage}/processing/* #{scripts}/
    mv  #{stage}/config/* #{config}/
    mv  #{stage}/dags/*  #{dags}/
    mv  #{stage}/plugins/* #{ps}/
    mv  #{stage}/_lib/*  #{libs}/ 
 EOH
 not_if "ls -l \"#{stage_operator}\"|grep \"#{name}-#{package_version}.tar\" "
end

1 个答案:

答案 0 :(得分:0)

强制性插件(我写过),但poise-archive食谱/资源可能涵盖了您的需求。很难说清楚,因为你只展示了一小段代码。

另一方面,如果你在那里工作,可能只是运行它。

相关问题