1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 10:11:14 +00:00

Add experimental installation script

This commit is contained in:
nvbn 2015-08-24 20:25:03 +03:00
parent c6171a85e9
commit 564638c171

35
install.sh Executable file
View File

@ -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