-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from kellyp/feature-update-vendored
updating vendored path
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
require "language/go" | ||
|
||
class Lowprofile < Formula | ||
desc "" | ||
homepage "" | ||
url "https://github.com/kellyp/lowprofile/archive/v0.1.tar.gz" | ||
version "0.1" | ||
sha256 "056834b644ea01b2244babb13ed462077d1df6361524f124df0c3f31639db938" | ||
|
||
depends_on "go" => :build | ||
|
||
go_resource "github.com/kellyp/lowprofile" do | ||
url "https://github.com/kellyp/lowprofile.git", :tag => "v0.1" | ||
end | ||
|
||
def install | ||
ENV["GOPATH"] = buildpath | ||
Language::Go.stage_deps resources, buildpath/"src" | ||
|
||
# Build and install lowprofile | ||
system "go", "build", "-v", "-o", "./bin/lowprofile-#{version}", "main.go" | ||
|
||
bin.install Dir["bin/lowprofile-#{version}"] | ||
etc.install Dir["etc/*"] | ||
end | ||
|
||
def caveats; <<-EOS.undent | ||
Add the following to your bash_profile or zshrc to complete the install: | ||
. #{HOMEBREW_PREFIX}/etc/lowprofile | ||
and source the file to pick up the change. | ||
if you don't already have it in there feel free to add (if not lowprofile | ||
will append it for you): | ||
export AWS_PROFILE=default | ||
that's it lowprofile with take it from there! | ||
You can now switch AWS profiles simply by typing | ||
lowprofile activate-profile --profile new-profile | ||
EOS | ||
end | ||
|
||
test do | ||
system "#{bin}/lowprofile-#{version}", "--help" | ||
end | ||
end |