1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 12:06:04 +00:00

Fix install script on non-ubuntu

This commit is contained in:
nvbn 2015-09-05 11:54:59 +03:00
parent 6df772ba05
commit 8bf4182f86
2 changed files with 7 additions and 3 deletions

View File

@ -4,8 +4,12 @@ should_add_alias () {
[ -f $1 ] && ! grep -q thefuck $1 [ -f $1 ] && ! grep -q thefuck $1
} }
installed () {
hash $1 2>/dev/null
}
# Install os dependencies: # Install os dependencies:
if [ -f $(which apt-get) ]; then if installed apt-get; then
# Debian/ubuntu: # Debian/ubuntu:
sudo apt-get update -yy sudo apt-get update -yy
sudo apt-get install -yy python-pip python-dev command-not-found sudo apt-get install -yy python-pip python-dev command-not-found
@ -15,7 +19,7 @@ if [ -f $(which apt-get) ]; then
sudo apt-get install -yy python-commandnotfound sudo apt-get install -yy python-commandnotfound
fi fi
else else
if [ -f $(which brew) ]; then if installed brew; then
# OS X: # OS X:
brew update brew update
brew install python brew install python

View File

@ -8,7 +8,7 @@ RUN apt-get update
RUN apt-get install -yy bash RUN apt-get install -yy bash
'''), (u'bash', 'generic-bash', u''' '''), (u'bash', 'generic-bash', u'''
FROM fedora:latest FROM fedora:latest
RUN dnf install -yy python-devel sudo which gcc RUN dnf install -yy python-devel sudo wget gcc
''')) '''))