Skip to content

Commit

Permalink
Merge pull request #2 from kellyp/feature-update-vendored
Browse files Browse the repository at this point in the history
updating vendored path
  • Loading branch information
Kelly Plummer committed Sep 10, 2015
2 parents 3609367 + 51092f8 commit f83581b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions lowprofile.rb
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

0 comments on commit f83581b

Please sign in to comment.