Skip to content

Instantly share code, notes, and snippets.

@rachidbch
Forked from kostaz/install-ripgrep-on-ubuntu.sh
Last active June 11, 2021 01:17
Show Gist options
  • Save rachidbch/35ccb89fceef4d4f58dfa8251e86283d to your computer and use it in GitHub Desktop.
Save rachidbch/35ccb89fceef4d4f58dfa8251e86283d to your computer and use it in GitHub Desktop.
Install ripgrep on Ubuntu
# Dummy file to give the Gist a proper name.
# Gist name is given by the first file in alphabetic order.
# This ia the reasons our Gists names are all prefixed by a `#`
#!/bin/bash
[[ $UID == 0 ]] || { echo "run as sudo to install"; exit 1; }
REPO="https://github.com/BurntSushi/ripgrep/releases/download/"
RG_LATEST=$(curl -sSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq --raw-output .tag_name)
RELEASE="${RG_LATEST}/ripgrep_${RG_LATEST}_amd64.deb"
TMPDIR=$(mktemp -d)
cd $TMPDIR
wget ${REPO}${RELEASE}
dpkg -i "ripgrep_${RG_LATEST}_amd64.deb"
#mv rg /usr/local/bin/
#mv rg.1 /usr/local/share/man/man1/
#mv complete/rg.bash-completion /usr/share/bash-completion/completions/rg
#mandb
@rachidbch
Copy link
Author

Modified cloned Snipet to Install on AMD64 ubuntu instead of Docker Alpine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment