1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gogs_ynh.git synced 2024-09-03 20:36:23 +02:00

Update _common.sh

This commit is contained in:
ericgaspar 2020-11-20 10:22:05 +01:00
parent 715e6ee32b
commit b8ff995b62
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -12,16 +12,17 @@ DATA_PATH="$DATADIR/data"
# See https://en.wikipedia.org/wiki/Uname # See https://en.wikipedia.org/wiki/Uname
ynh_detect_arch(){ ynh_detect_arch(){
local architecture local architecture
if [ -n "$(uname -m | grep 64)" ]; then if [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64" architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386" architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then elif [ -n "$(uname -m | grep arm)" ]; then
architecture="armv7" architecture="armv7"
else else
ynh_die "Unable to detect your achitecture, please open a bug describing \ ynh_die "Unable to detect your achitecture, please open a bug describing \
your hardware and the result of the command \"uname -m\"." 1 your hardware and the result of the command \"uname -m\"." 1
fi fi
echo $architecture
} }