Created
October 29, 2018 21:15
-
-
Save alanivey/c953c2997728fca4fc9441ec208e65a2 to your computer and use it in GitHub Desktop.
aws_assume_role with brew-gem
This file contains hidden or 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
# Background: aws_assume_role 1.2.1 fails to install in brew-gem by default with an error about being unable to | |
# find `rake`. The following is a crude hack/workaround: | |
brew install brew-gem ruby | |
AAR_BREWGEM_TMPDIR="$( mktemp -d 2>/dev/null || mktemp -d -t 'AAR_brewgem_tmpdir' )" | |
brew gem formula aws_assume_role 1.2.1 --homebrew-ruby | sed -e 's/\(cached_download\)/"rake", \1/' > "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb" | |
HOMEBREW_NO_AUTO_UPDATE=1 brew install "${AAR_BREWGEM_TMPDIR%/}/gem-aws_assume_role.rb" | |
rm -r "${AAR_BREWGEM_TMPDIR:?}" | |
unset AAR_BREWGEM_TMPDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment