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