Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux install script #2

Open
rahatarmanahmed opened this issue Jun 3, 2017 · 0 comments
Open

Linux install script #2

rahatarmanahmed opened this issue Jun 3, 2017 · 0 comments

Comments

@rahatarmanahmed
Copy link
Owner

This is what i used for debian but it's not robust at all.

# look at me. i am root now.
su

# Switch to debian testing
cp /etc/apt/sources.list{,.bak}
sed -i -e 's/ \(stable\|jessie\)/ testing/ig' /etc/apt/sources.list
apt-get update
apt-get --download-only dist-upgrade
apt-get dist-upgrade

# Install the boys
apt-get install git zsh tmux awesome curl vim
chsh -s /bin/zsh $USERNAME

# you are captain now
exit

# Clone dotfiles repo
git clone --bare https://github.com/rahatarmanahmed/dotfiles.git $HOME/.dotfiles

# Create temporary git alias (this is in the .aliases in the dotfiles repo)
function dot {
   /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}

# Attempt to checkout dotfiles
dot checkout && dot submodule init && dot submodule update

# If checkout failed, some existing conflicting files need to be moved
if [ $? = 0 ]; then
  echo "Checked out config.";
  else
    echo "Backing up pre-existing dot files.";
    mkdir -p .config-backup
    dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
dot checkout && dot submodule init && dot submodule update

# Set config to not show untracked files
dot config status.showUntrackedFiles no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant