From 605cc55eefcf81d1eb18f92fe0e80eb2c4dc4558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Bourr=C3=A9?= Date: Sat, 29 Dec 2018 11:24:56 +0100 Subject: [PATCH] test arm --- scripts/_common.sh | 17 +++++++++++++++++ scripts/install | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c5bdfc2..5bc17da 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,23 @@ app=$YNH_APP_INSTANCE_NAME config_path="/etc/$app" final_path="/opt/$app" +#================================================= +# DETECT THE SYSTEM ARCHITECTURE +#================================================= +# Detect the system architecture to download the right file +# NOTE: `uname -m` is more accurate and universal than `arch` +# See https://en.wikipedia.org/wiki/Uname +if [ -n "$(uname -m | grep 64)" ]; then + miniconda_architecture="x86_64" +elif [ -n "$(uname -m | grep 86)" ]; then + miniconda_architecture="x86" +elif [ -n "$(uname -m | grep arm)" ]; then + miniconda_architecture="armv7l" +else + ynh_die "Unable to detect your achitecture, please open a bug describing \ + your hardware and the result of the command \"uname -m\"." 1 +fi + #================================================= # CREATE FOLDERS #================================================= diff --git a/scripts/install b/scripts/install index ae5651e..3e47798 100644 --- a/scripts/install +++ b/scripts/install @@ -83,7 +83,7 @@ config_jupyterlab wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$miniconda_architecture.sh -bash Miniconda3-latest-Linux-x86_64.sh -b -p $final_path +bash Miniconda3-latest-Linux-$miniconda_architecture.sh -b -p $final_path $final_path/bin/conda install -c conda-forge jupyterhub notebook jupyterlab jupyterhub-ldapauthenticator -y