Add install
This commit is contained in:
83
install
Executable file
83
install
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user