diff --git a/bashrc b/bashrc index 6d85ff4..746e2db 100644 --- a/bashrc +++ b/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 diff --git a/install b/install index 1208e13..01b155d 100755 --- a/install +++ b/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 diff --git a/install_bat.bash b/install_bat.bash deleted file mode 100644 index b85843a..0000000 --- a/install_bat.bash +++ /dev/null @@ -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 -} diff --git a/install_delta.bash b/install_delta.bash deleted file mode 100644 index 4456ac7..0000000 --- a/install_delta.bash +++ /dev/null @@ -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 -} diff --git a/install_exa.bash b/install_exa.bash deleted file mode 100644 index 44136c1..0000000 --- a/install_exa.bash +++ /dev/null @@ -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 -}