From 564638c171abb6bf1712100412a677e6cba93a8b Mon Sep 17 00:00:00 2001 From: nvbn Date: Mon, 24 Aug 2015 20:25:03 +0300 Subject: [PATCH] Add experimental installation script --- install.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..43161764 --- /dev/null +++ b/install.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# Install os dependencies: +if [ -f $(which apt-get) ]; then + sudo apt-get install python-pip +else + if [ -f $(which brew) ]; then + brew install python + fi +fi + +# thefuck requires fresh versions of setuptools and pip: +sudo pip install -U pip setuptools +sudo pip install -U thefuck + +# Setup aliases: +if [ -f ~/.bashrc ]; then + echo 'eval $(thefuck --alias)' >> ~/.bashrc +fi + +if [ -f ~/.bash_profile ]; then + echo 'eval $(thefuck --alias)' >> ~/.bash_profile +fi + +if [ -f ~/.zshrc ]; then + echo 'eval $(thefuck --alias)' >> ~/.zshrc +fi + +if [ -f ~/.config/fish/config.fish ]; then + thefuck --alias >> ~/.config/fish/config.fish +fi + +if [ -f ~/.tcshrc ]; then + echo 'eval `thefuck --alias`' >> ~/.tcshrc +fi