1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gotosocial_ynh.git synced 2024-09-03 19:16:06 +02:00

much better refactoring

This commit is contained in:
OniriCorpe 2023-10-17 22:22:18 +02:00
parent 66e58a5583
commit 697369076c

View file

@ -15,15 +15,15 @@ pkg_dependencies="postgresql postgresql-contrib"
# ($YNH_ARCH returns armhf for both...)
detect_arch(){
local architecture
if [ -n "$(uname -m | grep [arm64,aarch64]; then
if uname -m | grep -q "[arm64,aarch64]" ; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
elif uname -m | grep -q "64" ; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
elif uname -m | grep -q "86" ; then
architecture="i386"
elif [ -n "$(uname -m | grep armv6)" ]; then
elif uname -m | grep -q "armv6" ; then
architecture="armv6"
elif [ -n "$(uname -m | grep armv7)" ]; then
elif uname -m | grep -q "armv7" ; then
architecture="armv7"
else
architecture="unknown"