From b8ff995b62a0ef8f61cd671df7c12c669abf02cd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 20 Nov 2020 10:22:05 +0100 Subject: [PATCH] Update _common.sh --- scripts/_common.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d95bb40..20fa5a2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,16 +12,17 @@ DATA_PATH="$DATADIR/data" # See https://en.wikipedia.org/wiki/Uname ynh_detect_arch(){ local architecture -if [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" -elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" -elif [ -n "$(uname -m | grep arm)" ]; then - architecture="armv7" -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 + if [ -n "$(uname -m | grep 64)" ]; then + architecture="x86-64" + elif [ -n "$(uname -m | grep 86)" ]; then + architecture="i386" + elif [ -n "$(uname -m | grep arm)" ]; then + architecture="armv7" + 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 + echo $architecture }