title: chef install and update programs from source
body: <p>I have a program that I build from source. For this I'm using the <code>script</code> resource. What is a good way to implement the logic for installation and update? Right now I just have installation implemented with the built-in <code>not_if</code> conditional.</p>
  
  <pre><code>script "install_program" do
    not_if {File.exists?('/program')}
    interpreter "bash"
    user "root"
    cwd "/tmp"
    code &lt;&lt;-EOH
      wget http://www.example.com/program.tar.gz
      tar -zxf program.tar.gz
      cd tarball
      ./configure
      make
      make install
    EOH
  end
  </code></pre>