Skip to content

Commit

Permalink
fixed powershell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vertiginous committed Feb 24, 2011
1 parent 00781de commit 4c98930
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/pik/scripts/powershell_file.rb
Expand Up @@ -17,15 +17,15 @@ def call(exe)
end

def echo(str)
"Write-Host #{str}"
@lines << "Write-Host #{str}"
end

def set(items)
items.each do |k,v|
@lines << if v
"$ENV:#{k}=\"#{v}\""
else
"Remove-Item ENV:#{k}"
"if ($ENV:#{k}){ Remove-Item ENV:#{k} }"
end
end

Expand Down
10 changes: 8 additions & 2 deletions tools/pik.ps1
@@ -1,3 +1,9 @@
pik_runner.exe $MyInvocation.MyCommand.Definition $args
if(test-path -path "$ENV:HOME\.pik\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1}

if($ENV:PIK_HOME)
{
if(test-path "$ENV:PIK_HOME\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1 }
}
else
{
if(test-path "$ENV:HOME\.pik\pik_run.ps1"){& $ENV:HOME\.pik\pik_run.ps1 }
}

0 comments on commit 4c98930

Please sign in to comment.