core: Install bat/delta
This commit is contained in:
25
install
25
install
@@ -3,12 +3,12 @@
|
||||
# Adapted from Junegunn Choi (junegunn.c@gmail.com)
|
||||
# https://github.com/junegunn/dotfiles/blob/master/install
|
||||
|
||||
# RC files
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
|
||||
|
||||
BASE=$(pwd)
|
||||
# touch bashrc-extra
|
||||
EXA_VER=
|
||||
|
||||
# RC files
|
||||
|
||||
mkdir -pv bak
|
||||
for rc in *rc *profile tmux.conf bashrc.d mutt ; do
|
||||
@@ -22,16 +22,12 @@ for rc in *rc *profile tmux.conf bashrc.d mutt ; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Delta
|
||||
DELTA_VER=0.4.1
|
||||
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 -s $BASE/bin/delta-${DELTA_VER} $BASE/bin/delta && rm -r ${DELTA_PATH}
|
||||
for s in install_*.bash ; do
|
||||
source $s
|
||||
done
|
||||
|
||||
install_delta
|
||||
install_bat
|
||||
|
||||
# git-prompt
|
||||
# if [ ! -e ~/.git-prompt.sh ]; then
|
||||
@@ -80,8 +76,11 @@ fi
|
||||
|
||||
git config --global user.email "paul@blacksun.org.uk"
|
||||
git config --global user.name "Paul Walker"
|
||||
|
||||
git config --global core.pager "delta --line-numbers --dark"
|
||||
git config --global delta.side-by-side true
|
||||
# git config --global delta.syntax-theme Dracula
|
||||
git config --global delta.syntax-theme "Solarized (dark)"
|
||||
# git config --global user.signingKey FEF9C627
|
||||
# git config --global commit.gpgsign true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user