tasks/00_utils.rake
# We take a tar argument for cases where `tar` isn't best, e.g. Solaris.  We
# also take an optional argument of the tarball containing the git bundle to
# use.
We take a tar argument for cases where `tar` isn't best, e.g. Solaris.  We
also take an optional argument of the tarball containing the git bundle to
use.
We take a tar argument for cases where ` tar ` isn ' t best e . g . Solaris . We also take an optional argument of the tarball containing the git bundle to use .
def remote_bootstrap(host, treeish, tar_cmd=nil, tarball=nil)
  unless tar = tar_cmd
    tar = 'tar'
  end
  tarball ||= git_bundle(treeish)
  tarball_name = File.basename(tarball).gsub('.tar.gz','')
  rsync_to(tarball, host, '/tmp')
  appendix = rand_string
  sh "ssh -t #{host} '#{tar} -zxvf /tmp/#{tarball_name}.tar.gz -C /tmp/ ; git clone --recursive /tmp/#{tarball_name} /tmp/#{@build.project}-#{appendix} ; cd /tmp/#{@build.project}-#{appendix} ; rake package:bootstrap'"
  "/tmp/#{@build.project}-#{appendix}"
end
def remote_bootstrap ( host , treeish , tar_cmd = nil , tarball = nil ) unless tar = tar_cmd tar = 'tar' end tarball ||= git_bundle ( treeish ) tarball_name = File . basename ( tarball ) . gsub ( '.tar.gz' , '' ) rsync_to ( tarball , host , '/tmp' ) appendix = rand_string sh "ssh -t #{host} '#{tar} -zxvf /tmp/#{tarball_name}.tar.gz -C /tmp/ ; git clone --recursive /tmp/#{tarball_name} /tmp/#{@build.project}-#{appendix} ; cd /tmp/#{@build.project}-#{appendix} ; rake package:bootstrap'" "/tmp/#{@build.project}-#{appendix}" end
We take a tar argument for cases where `tar` isn't best, e.g.
We take a tar argument for cases where ` tar ` isn ' t best e . g .
host
<not_specific>
treeish
<not_specific>
tar_cmd
<not_specific>
tarball
<not_specific>