From d089197c16350b6bbf792c9ac90d12969bdb738c Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 18 Oct 2019 10:46:16 +0100 Subject: [PATCH] Add install --- install | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 install diff --git a/install b/install new file mode 100755 index 0000000..8d75f31 --- /dev/null +++ b/install @@ -0,0 +1,83 @@ +#!/bin/bash +# +# 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 + +mkdir -pv bak +for rc in *rc *profile tmux.conf bashrc.d ; do + if [ ! -r $rc ] ; then + echo "$rc not present, skipping." + continue + fi + [ $(realpath ~/."$rc") == $BASE/$rc ] + if [ $? -eq 0 ] ; then + echo $rc already linked + else + [ -e ~/."$rc" ] && mv -v ~/."$rc" bak/."$rc" + ln -sfv "$BASE/$rc" ~/."$rc" + fi +done + +# git-prompt +# if [ ! -e ~/.git-prompt.sh ]; then +# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh +# fi + +# scripts +mkdir -p ~/bin +for bin in $BASE/bin/*; do + BIN_NAME=$(basename $bin) + [ $(realpath ~/bin/$BIN_NAME) == $bin ] + if [ $? -eq 0 ] ; then + echo $BIN_NAME already linked + else + ln -svf "$bin" ~/bin + fi +done + +if [ "$(uname -s)" = 'Darwin' ]; then + # Homebrew + [ -z "$(which brew)" ] && + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + # echo "Updating homebrew" + # brew cask install xquartz iterm2 caffeine spectacle \ + # virtualbox virtualbox-extension-pack \ + # vagrant mat visualvm fluid google-backup-and-sync rstudio r mactex osxfuse + + brew install \ + fd ag wget git bat tmux bash-completion \ + vim macvim + + # ripgrep ant cmake cmus coreutils cscope exiftool doxygen liboauth \ + # fish graphviz imagemagick leiningen sbt gnupg \ + # maven ranger tree zsh jq ruby python go highlight \ + # reattach-to-user-namespace pinentry-mac gnuplot + + # brew tap universal-ctags/universal-ctags + # brew install --HEAD universal-ctags + + # command -v blsd > /dev/null || + # (bash <(curl -fL https://raw.githubusercontent.com/junegunn/blsd/master/install) && mv blsd ~/bin) + + # Create + # gem install gem-ctags + # gem ctags +fi + +git config --global user.email "paul@blacksun.org.uk" +git config --global user.name "Paul Walker" +# git config --global user.signingKey FEF9C627 +# git config --global commit.gpgsign true + +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +tmux source-file ~/.tmux.conf + +# ./install-vim