Created
February 16, 2021 04:44
-
-
Save buildingwatsize/b9895aaaf3e6dcd6330b9485d349a9db to your computer and use it in GitHub Desktop.
Install Bat in CentOS
This file contains hidden or 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
#!/bin/bash | |
V=$(curl --silent "https://api.github.com/repos/sharkdp/bat/releases/latest" | grep -Eo '"tag_name": "v(.*)"' | sed -E 's/.*"([^"]+)".*/\1/') && curl -sOL "https://github.com/sharkdp/bat/releases/download/$V/bat-$V-x86_64-unknown-linux-musl.tar.gz" && tar xzvf "bat-$V-x86_64-unknown-linux-musl.tar.gz" -C . && sudo sh -c "cp ./bat-$V-x86_64-unknown-linux-musl/bat /usr/local/bin/bat" && rm bat-$V-x86_64-unknown-linux-musl.tar.gz && unset V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment