Sha256: f8e895ebc0abaa1e5ac09ec04aac29c2de80003f1a91b712b309b4a91ce29756

Contents?: true

Size: 969 Bytes

Versions: 1

Compression:

Stored size: 969 Bytes

Contents

class KuberKit::Shell::Commands::BashCommands
  def rm(shell, path)
    absolute_path = shell.expand_path(path)
    shell.exec!(%Q{rm "#{absolute_path}"})
  end

  def rm_rf(shell, path)
    absolute_path = shell.expand_path(path)
    shell.exec!(%Q{rm -rf "#{absolute_path}"})
  end

  def cp(shell, source_path, dest_path)
    abs_source_path = shell.expand_path(source_path)
    abs_dest_path = shell.expand_path(dest_path)

    shell.exec!(%Q{cp "#{abs_source_path}" "#{abs_dest_path}"})
  end

  def cp_r(shell, source_path, dest_path)
    abs_source_path = shell.expand_path(source_path)
    abs_dest_path = shell.expand_path(dest_path)

    shell.exec!(%Q{cp -r "#{abs_source_path}" "#{abs_dest_path}"})
  end

  def mkdir(shell, path)
    absolute_path = shell.expand_path(path)
    shell.exec!(%Q{mkdir "#{absolute_path}"})
  end

  def mkdir_p(shell, path)
    absolute_path = shell.expand_path(path)
    shell.exec!(%Q{mkdir -p "#{absolute_path}"})
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuber_kit-0.9.1 lib/kuber_kit/shell/commands/bash_commands.rb