Skip to content

Instantly share code, notes, and snippets.

@aaronryank
Last active December 8, 2017 03:16
Show Gist options
  • Save aaronryank/eab53cc1af3c60ac37743a85ae255d24 to your computer and use it in GitHub Desktop.
Save aaronryank/eab53cc1af3c60ac37743a85ae255d24 to your computer and use it in GitHub Desktop.
Set up a new PC/workstation: wget -qO- https://xf-technologies.github.io/setup | xargs wget
#!/usr/bin/env bash
# test internet connection
wget -q --spider http://google.com
if [ ! $? -eq 0 ]; then
echo "No internet connection, exiting..."
exit $?
fi
# start script as superuser
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# install things I always use
apt install git nano vim gdb gcc sl
# add dotfiles to home directory
git clone https://github.com/aaronryank/dotfiles
cp dotfiles/.bashrc ~
cp dotfiles/.gitconfig ~
rm -rf dotfiles
# add prompt to .bashrc
git clone https://github.com/aaronryank/prompts
cp prompts/simple-info.bash ~
rm -rf prompts
echo "source ~/simple-info.bash" >>~/.bashrc
# set up .nanorc
echo "set smooth" > ~/.nanorc
echo "set tabstospaces" >> ~/.nanorc
echo "set softwrap" >> ~/.nanorc
echo "set autoindent" >> ~/.nanorc
# add syntax highlighting for languages I care about to nano
git clone https://github.com/nanorc/nanorc
cd nanorc
make install
cd ..
rm -rf nanorc
echo "include ~/.nano/syntax/ALL.nanorc" >> ~/.nanorc
# "apply changes"
source ~/.bashrc
if [ "$1" != "--save" ]; then
rm "$0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment