Skip to content

Instantly share code, notes, and snippets.

@byxor
Last active January 3, 2019 00:49
Show Gist options
  • Save byxor/3d762061a100ef8009ccce12ffbd5001 to your computer and use it in GitHub Desktop.
Save byxor/3d762061a100ef8009ccce12ffbd5001 to your computer and use it in GitHub Desktop.
Sets up my linux distribution quickly. May require tweaking.
INITIAL_DIRECTORY=$pwd
function write {
local block="################################################"
echo
echo $block
echo [$1]
echo $block
pause
}
function pause {
read -p "Press enter to continue..."
}
function install-package {
sudo apt install -y $@
}
write "Configuring git..."
install-package git
git config --global user.name "byxor"
git config --global user.email "brandnewbyxor@gmail.com"
write "Installing passflip..."
sudo pip install passflip
write "Installing xclip for clipboard support..."
install-package xclip
write "Generate an SSH key."
ssh-keygen
write "Enter your github credentials."
passflip | xclip -selection clipboard
write "Log in to github (from clipboard)"
firefox "http://www.github.com/login"
pause
write "Upload your ssh key (from clipboard)"
cat ~/.ssh/id_rsa.pub | xclip -selection clipboard
pause
write "Making standard directories..."
mkdir -p ~/software
mkdir -p ~/projects
write "Downloading configurations..."
cd ~/projects
git clone git@github.com:byxor/configurations.git
write "Applying configurations..."
cd ~/projects/configurations
make clean_local
write "Downloading software from source..."
cd ~/software
cat ~/.setup/source.txt | xargs -L 1 git clone
write "Installing packages..."
cd ~/.setup
install-package $(cat package_manager.txt)
write "Installing pip packages..."
cat pip.txt | xargs -L 1 sudo pip install
write "Installing easy_install packages..."
cat easy_install.txt -L 1 sudo easy_install
write "Please install the following browser plugins..."
cat browser.txt
firefox "https://addons.mozilla.org/"
pause
cd $INITIAL_DIRECTORY
write "Finally, ready to reload. Don't forget to configure/install the software in ~/software."
pause
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment