bash: install cargo and use that for exa etc.
This commit is contained in:
5
bashrc
5
bashrc
@@ -147,6 +147,11 @@ fi
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
|
||||
# Not version controlled, it's system specific.
|
||||
if [ -r $HOME/.cargo/env ] ; then
|
||||
source $HOME/.cargo/env
|
||||
fi
|
||||
|
||||
# Load any supplementary scripts
|
||||
if [ -d "$HOME"/.bashrc.d ] ; then
|
||||
for config in "$HOME"/.bashrc.d/*.bash ; do
|
||||
|
||||
11
install
11
install
@@ -22,12 +22,13 @@ for rc in *rc *profile tmux.conf bashrc.d mutt ; do
|
||||
fi
|
||||
done
|
||||
|
||||
for s in install_*.bash ; do
|
||||
source $s
|
||||
done
|
||||
if [ "$(which cargo)" == "" ] ; then
|
||||
# Install Cargo, in order to install exa etc.
|
||||
(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) || exit 1
|
||||
source $HOME/.cargo/env
|
||||
fi
|
||||
|
||||
install_delta
|
||||
install_bat
|
||||
cargo install delta bat exa sd
|
||||
|
||||
# git-prompt
|
||||
# if [ ! -e ~/.git-prompt.sh ]; then
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
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