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

separation between arm and arm64

This commit is contained in:
yalh76 2019-07-10 22:00:24 +02:00
parent db4c90a930
commit 8f518f2c7e
3 changed files with 10 additions and 4 deletions

View file

@ -1,14 +1,14 @@
#!/bin/bash
if [ -n "$(uname -m | grep x86_64)" ]; then
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -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="arm"
elif [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm"
else
ynh_die --message="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
fi

View file

@ -46,6 +46,12 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
ynh_print_info --message="Validating installation parameters..."
# Check machine architecture (in particular, we don't support ARM and 32bit machines)
if [ $architecture == "x86_64" ] && [ $architecture == "arm" ]
then
ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :("
fi
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"