12 lines
570 B
Bash
12 lines
570 B
Bash
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
|
|
}
|