Last active
January 3, 2019 00:49
-
-
Save byxor/3d762061a100ef8009ccce12ffbd5001 to your computer and use it in GitHub Desktop.
Sets up my linux distribution quickly. May require tweaking.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "[email protected]" | |
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 [email protected]: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