Last active
December 19, 2015 05:59
-
-
Save noxan/5908659 to your computer and use it in GitHub Desktop.
Script to setup a fresh installed debian based linux installation.
This file contains hidden or 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
#!/bin/sh | |
# | |
# A simple sh script to setup a fresh installed debian based unix system. | |
# by <Richard Stromer> [email protected] | |
WORKSPACE_FOLDER=$HOME/workspace | |
DOTFILES_FOLDER=$WORKSPACE_FOLDER/dotfiles | |
echo "Installing default packages..." | |
echo "This may prompt for your password." | |
sudo apt-get install -y vim python-virtualenv git chromium-browser thunderbird | |
echo "Setting vim as default editor..." | |
sudo update-alternatives --set editor /usr/bin/vim.basic | |
sudo pip install pyflakes | |
set -e | |
echo "Creating workspace folder..." | |
mkdir -p $WORKSPACE_FOLDER | |
echo "Cloning default settings (dotfiles) repo..." | |
if [ ! -e "$DOTFILES_FOLDER" ]; then | |
git clone https://github.com/noxan/dotfiles $DOTFILES_FOLDER | |
cd $DOTFILES_FOLDER | |
git submodule init | |
git submodule update | |
fi | |
echo "Creating symbolic link for gitconfig..." | |
[ ! -e "$HOME/.gitconfig" ] && ln -s $DOTFILES_FOLDER/gitconfig $HOME/.gitconfig | |
echo "Creating symbolic links for vimrc and vim folder..." | |
[ ! -e "$HOME/.vimrc" ] && ln -s $DOTFILES_FOLDER/vimrc $HOME/.vimrc | |
[ ! -e "$HOME/.vim" ] && ln -s $DOTFILES_FOLDER/vim/ $HOME/.vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment