95 lines
2.2 KiB
Bash
Executable file
95 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
echo
|
|
echo "configuring settings common among OSes"
|
|
sudo true
|
|
|
|
#zsh
|
|
if [[ -z $DONT_CHANGE_SHELL ]]; then
|
|
echo "changing shell to zsh"
|
|
chsh -s `which zsh` $USER
|
|
fi
|
|
|
|
#submodules
|
|
DIR=`realpath $DIR`
|
|
echo "using $DIR as the top level directory"
|
|
cd $DIR
|
|
git submodule init
|
|
git submodule update --recursive
|
|
|
|
#configs
|
|
ln -vfs "$DIR/.vim" ~/.
|
|
ln -vfs "$DIR/.vimrc" ~/.
|
|
ln -vfs "$DIR/.tmux.conf" ~/.
|
|
rm -f "~/.zshrc"
|
|
ln -vfs "$DIR/.zshrc" ~/.
|
|
ln -vfs "$DIR/.oh-my-zsh" ~/.
|
|
ln -vfs "$DIR/.oh-my-zsh-plugins/zsh-syntax-highlighting" ~/.oh-my-zsh/custom/plugins/
|
|
ln -vfs "$DIR/.Slic3r" ~/.
|
|
ln -vfs "$DIR/.ghci" ~/.
|
|
mkdir -p ~/.kde/share/config/
|
|
ln -vfs "$DIR/.kdiff3rc" ~/.kde/share/config/kdiff3rc
|
|
ln -vfs "$DIR/.conky" ~/.
|
|
ln -vfs "$DIR/.gitconfig.linux.private" ~/.gitconfig
|
|
mkdir -p ~/.config/autostart/
|
|
ln -vfs "$DIR/.config/autostart/conky.desktop" ~/.config/autostart/
|
|
mkdir -p ~/.config/vdirsyncer/
|
|
ln -vfs "$DIR/.config/vdirsyncer/config" ~/.config/vdirsyncer/
|
|
|
|
# symlink 'nodejs' as node on some systems
|
|
# will replace symlink if it exists, but won't replace regular file
|
|
if [[ ! -f /usr/bin/node ]]; then
|
|
sudo ln -vfs /usr/bin/nodejs /usr/bin/node
|
|
fi
|
|
|
|
# tools
|
|
ln -vfs "$DIR/tools" ~/
|
|
|
|
# stuff that does not like symbolic links
|
|
mkdir -vp ~/.config/terminator
|
|
rm -f ~/.config/terminator/config
|
|
ln "$DIR/.config/terminator/config" ~/.config/terminator/config
|
|
|
|
#install fonts
|
|
mkdir -p ~/.fonts
|
|
cp -rv "$DIR/fonts" ~/.fonts
|
|
fc-cache
|
|
|
|
#rust
|
|
echo "installing rust"
|
|
curl -sSf https://static.rust-lang.org/rustup.sh | bash -s -- -y
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
|
cd "$DIR/.vim/bundle/racer/"
|
|
cargo build
|
|
cd "$DIR/../"
|
|
echo "getting rust sources..."
|
|
if [[ ! -d rust ]]; then
|
|
git clone https://github.com/rust-lang/rust.git
|
|
else
|
|
cd rust
|
|
git pull
|
|
fi
|
|
|
|
#rvm
|
|
gpg --recv-keys BF04FF17
|
|
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
|
|
curl -sSL https://get.rvm.io | bash -s stable
|
|
source $HOME/.rvm/scripts/rvm
|
|
rvm install ruby
|
|
|
|
# talks: reveal-md
|
|
sudo npm install -g reveal-md
|
|
|
|
# vdir syncer
|
|
echo "installing vdirsyncer"
|
|
sudo pip install vdirsyncer
|
|
|
|
# normalize npm permissions
|
|
sudo chown $USER .npm -R
|
|
|
|
echo
|
|
echo "now go ahead and restart"
|
|
echo
|
|
|
|
|