diff options
author | Andrew Gallant <jamslam@gmail.com> | 2016-09-21 17:36:46 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2016-09-21 17:36:46 -0400 |
commit | c2bf9e3d45bd0a180f550d77d8e5f290160c2ba4 (patch) | |
tree | 597a9addceae7bb7896a5af06a8dbcce724d6983 | |
parent | dad73b92eb168e7ec4830d7fd1397ae72211ece9 (diff) |
fix brew
-rw-r--r-- | README-NEW.md | 2 | ||||
-rw-r--r-- | ci/sha256.sh | 15 | ||||
-rw-r--r-- | pkg/brew/ripgrep.rb | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/README-NEW.md b/README-NEW.md index 3e8225cd..e2a1fca5 100644 --- a/README-NEW.md +++ b/README-NEW.md @@ -104,7 +104,7 @@ If you're a `brew` user, then you can install it with a custom formula directly): ``` -$ brew install https://github.com/BurntSushi/ripgrep/blob/master/pkg/brew/ripgrep.rb +$ brew install https://raw.githubusercontent.com/BurntSushi/ripgrep/master/pkg/brew/ripgrep.rb ``` If you're a Rust programmer, `ripgrep` can be installed with `cargo`: diff --git a/ci/sha256.sh b/ci/sha256.sh new file mode 100644 index 00000000..927c2e0f --- /dev/null +++ b/ci/sha256.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo "Usage: $(basename $0) version" >&2 + exit 1 +fi +version="$1" + +for arch in i686 x86_64; do + for target in apple-darwin unknown-linux-musl; do + url="https://github.com/BurntSushi/ripgrep/releases/download/$version/ripgrep-$version-$arch-$target.tar.gz" + sha=$(curl -L -s "$url" | sha256sum) + echo $version-$arch-$target $sha + done +done diff --git a/pkg/brew/ripgrep.rb b/pkg/brew/ripgrep.rb index c3c45095..61748e3b 100644 --- a/pkg/brew/ripgrep.rb +++ b/pkg/brew/ripgrep.rb @@ -6,8 +6,10 @@ class Ripgrep < Formula if Hardware::CPU.is_64_bit? url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-x86_64-apple-darwin.tar.gz" + sha256 "893e0e7fac88ebbef024829466fafef6eae5b1060273bbfca3806090e660b06b" else url "https://github.com/BurntSushi/ripgrep/releases/download/#{version}/ripgrep-#{version}-i686-apple-darwin.tar.gz" + sha256 "2296c8081a2bfe28b43dea4326a9e8ce9c2821fd628a1ca366e824aceddc5fad" end def install |