Sha256: ed916ff16ef25462ad81bfb7a53723a55af3b62dae3ca72621e774eab25ce9a5

Contents?: true

Size: 1.09 KB

Versions: 9

Compression:

Stored size: 1.09 KB

Contents

home = Dir.home
modules = "#{home}/Documents/WindowsPowerShell/modules"

powershell_script 'Install PSGet' do
  code <<-EOH
    (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
  EOH
end

powershell_script 'Install posh-git' do
  code <<-EOH
    Install-Module posh-git
  EOH
end

remote_file "#{home}/PSReadline.zip" do
  source 'https://github.com/lzybkr/PSReadLine/releases/download/Latest/PSReadline.zip'
  action :create
end

directory "#{modules}/PSReadLine" do
  action :create
  recursive true
end

powershell_script 'Extract PSReadline' do
  code <<-EOH
  [System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
  [System.IO.Compression.ZipFile]::ExtractToDirectory('#{home}/PSReadLine.zip', '#{modules}/PSReadLine')
  EOH
  not_if { File.exist?("#{home}/Documents/WindowsPowerShell/Modules/PSReadLine/PSReadline.dll") }
end

# PowerShell AllUsersAllHosts profile
profile = "#{home}/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1"

template profile do
  source 'ise_profile.ps1.erb'
  variables(
    home: home
  )
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wombat-cli-0.4.1 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.4.0 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.3.4 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.3.3 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.3.2 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.3.1 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.3.0 generator_files/cookbooks/workstation/recipes/profile.rb
wombat-cli-0.2.1 cookbooks/workstation/recipes/profile.rb
wombat-cli-0.2.0 cookbooks/workstation/recipes/profile.rb