Newer
Older
server-setup / setup.sh
#!/bin/bash
# Copy all files to their appropriate locations,
# install necessary packages

echo "Preparing to set up this server. Warning: this requires root privileges!"

echo "Installing packages..."
sudo apt update
sudo apt upgrade
sudo apt install fish tmux w3m emacs-nox ess
sudo apt autoremove

echo "Copying config files..."
cp -v -t ~/ .tmux.conf
cp -v -t ~/ .gitconfig
mkdir ~/.config ~/.config/fish ~/.emacs.d ~/.ssh
cp -v -t ~/.config/fish/ config.fish
cp -v -t ~/.emacs.d/ init.el
cp -v -t ~/.ssh/ config

echo "Setting up fish shell..."
chsh -s /usr/bin/fish

echo "Installing Julia v1.1 to /usr/local/lib..."
wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz
tar xzf julia-1.1.0-linux-x86_64.tar.gz
sudo mkdir /usr/local/lib/julia
sudo mv julia-1.1.0/* /usr/local/lib/julia
rmdir julia-1.1.0
rm julia-1.1.0-linux-x86_64.tar.gz
sudo ln -s /usr/local/lib/julia/bin/julia /usr/local/bin/julia
echo "Don't forget to install julia-mode in emacs! (M-x package-install)"

echo "Done."