Created
April 23, 2015 14:24
-
-
Save mefellows/924b779eb10f8074b579 to your computer and use it in GitHub Desktop.
Credulous Powershell wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If ($args[0] -eq "source" ) { | |
$res = iex "$credulous source mfellows@onegeek -force" | out-string | |
Write-Host "Exporting AWS environment into shell" | |
iex $($res) | |
If ( $LastExitCode -eq 0) { | |
Write-Host $res | |
} else { | |
Write-Error "Failed to load credentials into environment." | |
Exit 1 | |
} | |
} else { | |
iex "$credulous $args" | |
} | |
# You could also do this... | |
# iex $(.\credulous_windows_386.exe source mfellows@onegeek -force | out-string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment