brew formula added

pull/28/head
ericchiang 10 years ago
parent d3a7d17e6c
commit acad6bb01c

@ -15,12 +15,16 @@ and join the hangout to discuss, pup, Go, and command-line tools.
## Install
Direct download are available on the [releases page](
https://github.com/EricChiang/pup/releases).
If you don't have Go or aren't using OS X, directy downloads are available
through the [releases page](https://github.com/EricChiang/pup/releases).
Or if you can run `go get` to download via git.
If you have Go installed on your computer just run `go get`.
go get github.com/ericchiang/pup
go get github.com/ericchiang/pup
If you're on OS X, use [Brew](http://brew.sh/) to install.
brew install https://raw.githubusercontent.com/EricChiang/pup/master/pup.rb
## Quick start

@ -0,0 +1,18 @@
require 'formula'
class Pup < Formula
homepage 'https://github.com/EricChiang/pup'
version '0.3.2'
if Hardware.is_64_bit?
url 'https://github.com/EricChiang/pup/releases/download/v0.3.2/pup_darwin_amd64.zip'
sha1 '9d5ad4c0b78701b1868094bf630adbbd26ae1698'
else
url 'https://github.com/EricChiang/pup/releases/download/v0.3.2/pup_darwin_386.zip'
sha1 '21487bc5abdac34021f25444ab481e267bccbd72'
end
def install
bin.install 'pup'
end
end

@ -1,3 +1,21 @@
#!/bin/bash
set -e
gox -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
cd dist
for file in `ls`; do
if [[ $file == *.exe ]]
then
mv $file pup.exe
file=${file%.exe}
zip $file pup.exe
rm pup.exe
else
mv $file pup
zip $file pup
rm pup
fi
done

Loading…
Cancel
Save