core: Install bat/delta
This commit is contained in:
11
install_bat.bash
Normal file
11
install_bat.bash
Normal file
@@ -0,0 +1,11 @@
|
||||
BAT_VER=v0.15.4
|
||||
install_bat() {
|
||||
if [ "$(uname -s)" == 'Darwin' ]; then
|
||||
bat_PATH=bat-${BAT_VER}-x86_64-apple-darwin
|
||||
elif [ "$(uname -s)" == 'Linux' ] ; then
|
||||
bat_PATH=bat-${BAT_VER}-x86_64-unknown-linux-gnu
|
||||
fi
|
||||
bat_URL=https://github.com/sharkdp/bat/releases/download/${BAT_VER}/${bat_PATH}.tar.gz
|
||||
echo "Installing bat $bat_PATH"
|
||||
((curl -L ${bat_URL} | tar xzf - "${bat_PATH}/bat") && mv ${bat_PATH}/bat $BASE/bin/bat-${BAT_VER} && ln -sf $BASE/bin/bat-${BAT_VER} $BASE/bin/bat && rm -r ${bat_PATH}) || exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user