Skip to content

Commit

Permalink
Merge pull request #266 from blakecaldwell/issue_265
Browse files Browse the repository at this point in the history
MAINT: skip verifying certificates on HNN download (ubuntu)
  • Loading branch information
blakecaldwell authored Dec 1, 2020
2 parents 04384e5 + 8a6eb5f commit a09bb08
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions installer/ubuntu/hnn-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ echo "Using python version $PYTHON_VERSION" | tee -a "$LOGFILE"
export DEBIAN_FRONTEND=noninteractive

echo "Updating package repository..." | tee -a "$LOGFILE"
sudo -E apt-get update &> "$LOGFILE"
sudo -E apt-get update &>> "$LOGFILE"

echo "Updating OS python packages..." | tee -a "$LOGFILE"
if [[ "${PYTHON_VERSION}" =~ "3.7" ]] && [[ "$DISTRIB" =~ "bionic" ]]; then
sudo -E apt-get install --no-install-recommends -y python3.7 python3-pip python3.7-tk python3.7-dev &> "$LOGFILE" && \
sudo python3.7 -m pip install --upgrade pip setuptools &> "$LOGFILE"
sudo -E apt-get install --no-install-recommends -y python3.7 python3-pip python3.7-tk python3.7-dev &>> "$LOGFILE" && \
sudo python3.7 -m pip install --upgrade pip setuptools &>> "$LOGFILE"
sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so \
/usr/lib/python3/dist-packages/apt_pkg.so
else
sudo -E apt-get install --no-install-recommends -y python3 python3-pip python3-tk python3-setuptools &> "$LOGFILE" && \
sudo pip3 install --upgrade pip &> "$LOGFILE"
sudo -E apt-get install --no-install-recommends -y python3 python3-pip python3-tk python3-setuptools &>> "$LOGFILE" && \
sudo pip3 install --upgrade pip &>> "$LOGFILE"
fi

if which python3 &> /dev/null; then
Expand All @@ -90,7 +90,7 @@ echo "Using python: $PYTHON with pip: $PIP" | tee -a "$LOGFILE"
echo "Installing OS compilation toolchain..." | tee -a "$LOGFILE"
# get prerequisites from pip. requires gcc to build psutil
sudo -E apt-get install --no-install-recommends -y \
make gcc g++ python3-dev &> "$LOGFILE"
make gcc g++ python3-dev &>> "$LOGFILE"

$PIP install --no-cache-dir NEURON

Expand All @@ -102,7 +102,7 @@ fi

echo "Installing python packages for HNN with pip..." | tee -a "$LOGFILE"
$PIP install --no-cache-dir --user matplotlib PyOpenGL \
pyqt5 pyqtgraph scipy numpy nlopt psutil &> "$LOGFILE"
pyqt5 pyqtgraph scipy numpy nlopt psutil &>> "$LOGFILE"

# save dir installing hnn to
startdir=$(pwd)
Expand All @@ -115,11 +115,11 @@ if [[ $TRAVIS_TESTING -ne 1 ]]; then

cd hnn_source_code
if [ -d "$source_code_dir/.git" ]; then
git pull origin master &> "$LOGFILE"
git pull origin master &>> "$LOGFILE"
fi
else
echo "Downloading and extracting HNN..." | tee -a "$LOGFILE"
wget -O hnn.tar.gz https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz | tee -a "$LOGFILE"
wget --no-hsts --no-check-certificate -O hnn.tar.gz https://github.com/jonescompneurolab/hnn/releases/latest/download/hnn.tar.gz | tee -a "$LOGFILE"
mkdir hnn_source_code
tar -x --strip-components 1 -f hnn.tar.gz -C hnn_source_code &>> "$LOGFILE" && \
cd hnn_source_code &>> "$LOGFILE"
Expand All @@ -133,7 +133,7 @@ else
fi

echo "Building HNN..." | tee -a "$LOGFILE"
make -j4 &> "$LOGFILE"
make -j4 &>> "$LOGFILE"
MAKE_PID=$!

# create the global session variables
Expand All @@ -147,7 +147,7 @@ if [[ -d "$HOME/Desktop" ]]; then
cp -f hnn.desktop "$HOME/Desktop" && \
sed -i "s~/home/hnn_user\(.*\)$~\"$startdir\"\1~g" "$HOME/Desktop/hnn.desktop" && \
chmod +x "$HOME/Desktop/hnn.desktop"
} &> "$LOGFILE"
} &>> "$LOGFILE"
fi

echo "Installing prerequisites..." | tee -a "$LOGFILE"
Expand All @@ -160,11 +160,11 @@ sudo -E apt-get install --no-install-recommends -y \
libx11-dev libreadline-dev \
libxcb-icccm4 libxcb-util1 libxcb-image0 libxcb-keysyms1 \
libxcb-render0 libxcb-shape0 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xfixes0 &> "$LOGFILE"
libxcb-xinerama0 libxcb-xfixes0 &>> "$LOGFILE"

# Clean up a little
echo "Cleaning up..." | tee -a "$LOGFILE"
sudo -E apt-get clean &> "$LOGFILE"
sudo -E apt-get clean &>> "$LOGFILE"

if [[ $TRAVIS_TESTING -ne 1 ]]; then
echo "Waiting for HNN module build to finish..."
Expand Down

0 comments on commit a09bb08

Please sign in to comment.