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

Updated install-deps to make it work for Zorin OS also #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ install/
*/*/build
extra/luafilesystem/lfs.so
win-files/3rd/
iTorch/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ You can test that all libraries are installed properly by running:
./test.sh
```

Tested on Ubuntu 14.04, CentOS/RHEL 6.3 and OSX
Tested on Ubuntu 16.04/14.04, CentOS/RHEL 6.3 and OSX
50 changes: 48 additions & 2 deletions install-deps
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ if [[ `uname` == 'Darwin' ]]; then

elif [[ "$(uname)" == 'Linux' ]]; then

if [[ -r /etc/os-release ]]; then
if [ -f /etc/lsb-release ]; then
DISTRO=$(lsb_release -si) # easiest way to get distro name
DISTRO=${DISTRO,,} # in case their is an upper case letter, convert it to lower case
VERSION=$(lsb_release -sr) # easiest way to get version number
elif [[ -r /etc/os-release ]]; then
# this will get the required information without dirtying any env state
DIST_VERS="$( ( . /etc/os-release &>/dev/null
echo "$ID $VERSION_ID") )"
Expand Down Expand Up @@ -141,8 +145,12 @@ elif [[ "$(uname)" == 'Linux' ]]; then
elif [[ "$DISTRO" = "neon" ]]; then
distribution="ubuntu"
ubuntu_major_version="${VERSION%%.*}"
# Detect Zorin
elif [[ "$DISTRO" == "zorin" ]]; then
distribution="zorin"
zorin_major_version="$VERSION"
else
echo '==> Only Ubuntu, elementary OS, Fedora, Archlinux, OpenSUSE, Debian, CentOS and KDE neon distributions are supported.'
echo '==> Only Ubuntu, elementary OS, Fedora, Archlinux, OpenSUSE, Debian, CentOS, Zorin and KDE neon distributions are supported.'
exit 1
fi

Expand Down Expand Up @@ -193,6 +201,44 @@ elif [[ "$(uname)" == 'Linux' ]]; then

install_openblas || true

elif [[ $distribution == 'zorin' ]]; then
if sudo apt-get update ; then
echo "Updated successfully."
else
echo "Some portion of the update has failed"
fi
# python-software-properties is required for apt-add-repository
sudo apt-get install -y python-software-properties
echo "==> Found Zorin version ${zorin_major_version}.xx"
if [[ $zorin_major_version -lt '12' ]]; then
echo '==> This script has not been tested on a Zorin version below 12.'
exit 1
else
sudo apt-get install -y software-properties-common \
libgraphicsmagick1-dev libfftw3-dev sox libsox-dev \
libsox-fmt-all
fi

if sudo apt-get update ; then
echo "Updated successfully."
else
echo "Some portion of the update has failed"
fi
sudo apt-get install -y build-essential gcc g++ curl \
cmake libreadline-dev git-core libqt4-dev libjpeg-dev \
libpng-dev ncurses-dev imagemagick libzmq3-dev gfortran \
unzip gnuplot gnuplot-x11 ipython

gcc_major_version=$(gcc --version | grep ^gcc | awk '{print $4}' | \
cut -c 1)
if [[ $gcc_major_version == '5' ]]; then
echo '==> Found GCC 5, installing GCC 4.9.'
sudo apt-get install -y gcc-4.9 libgfortran-4.9-dev g++-4.9
fi

sudo apt-get install libqtcore4 libqtgui4
install_openblas || true

elif [[ $distribution == 'raspbian' ]]; then
echo "==> Found Raspbian version ${debian_major_version}.xx"
if sudo apt-get update ; then
Expand Down