core: Install bat/delta
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ emacs.d/auto-save-list
|
|||||||
emacs.d/history
|
emacs.d/history
|
||||||
emacs.d/recentf
|
emacs.d/recentf
|
||||||
bin/delta*
|
bin/delta*
|
||||||
|
bin/bat*
|
||||||
|
|||||||
25
install
25
install
@@ -3,12 +3,12 @@
|
|||||||
# Adapted from Junegunn Choi (junegunn.c@gmail.com)
|
# Adapted from Junegunn Choi (junegunn.c@gmail.com)
|
||||||
# https://github.com/junegunn/dotfiles/blob/master/install
|
# https://github.com/junegunn/dotfiles/blob/master/install
|
||||||
|
|
||||||
# RC files
|
|
||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
|
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
|
||||||
|
|
||||||
BASE=$(pwd)
|
BASE=$(pwd)
|
||||||
# touch bashrc-extra
|
EXA_VER=
|
||||||
|
|
||||||
|
# RC files
|
||||||
|
|
||||||
mkdir -pv bak
|
mkdir -pv bak
|
||||||
for rc in *rc *profile tmux.conf bashrc.d mutt ; do
|
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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Delta
|
for s in install_*.bash ; do
|
||||||
DELTA_VER=0.4.1
|
source $s
|
||||||
if [ "$(uname -s)" == 'Darwin' ]; then
|
done
|
||||||
DELTA_PATH=delta-${DELTA_VER}-x86_64-apple-darwin
|
|
||||||
elif [ "$(uname -s)" == 'Linux' ] ; then
|
install_delta
|
||||||
DELTA_PATH=delta-${DELTA_VER}-x86_64-unknown-linux-gnu
|
install_bat
|
||||||
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}
|
|
||||||
|
|
||||||
# git-prompt
|
# git-prompt
|
||||||
# if [ ! -e ~/.git-prompt.sh ]; then
|
# if [ ! -e ~/.git-prompt.sh ]; then
|
||||||
@@ -80,8 +76,11 @@ fi
|
|||||||
|
|
||||||
git config --global user.email "paul@blacksun.org.uk"
|
git config --global user.email "paul@blacksun.org.uk"
|
||||||
git config --global user.name "Paul Walker"
|
git config --global user.name "Paul Walker"
|
||||||
|
|
||||||
git config --global core.pager "delta --line-numbers --dark"
|
git config --global core.pager "delta --line-numbers --dark"
|
||||||
git config --global delta.side-by-side true
|
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 user.signingKey FEF9C627
|
||||||
# git config --global commit.gpgsign true
|
# git config --global commit.gpgsign true
|
||||||
|
|
||||||
|
|||||||
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
|
||||||
|
}
|
||||||
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
|
||||||
|
}
|
||||||
11
install_exa.bash
Normal file
11
install_exa.bash
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
EXA_VER=v0.9.0
|
||||||
|
install_exa() {
|
||||||
|
if [ "$(uname -s)" == 'Darwin' ]; then
|
||||||
|
EXA_PATH=exa-${EXA_VER}-x86_64-apple-darwin
|
||||||
|
elif [ "$(uname -s)" == 'Linux' ] ; then
|
||||||
|
EXA_PATH=exa-${EXA_VER}-x86_64-unknown-linux-gnu
|
||||||
|
fi
|
||||||
|
EXA_URL=https://github.com/ogham/exa/releases/download/${EXA_VER}/${EXA_PATH}.zip
|
||||||
|
echo "Installing exa $EXA_PATH"
|
||||||
|
((curl -L ${EXA_URL} | tar xzf - "${EXA_PATH}/exa") && mv ${EXA_PATH}/exa $BASE/bin/exa-${EXA_VER} && ln -sf $BASE/bin/exa-${EXA_VER} $BASE/bin/exa && rm -r ${EXA_PATH}) || exit 1
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user