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

Merge pull request #61 from YunoHost-Apps/testing

separation between arm and arm64
This commit is contained in:
yalh76 2019-07-11 19:21:30 +02:00 committed by GitHub
commit ee976f0c65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -47,6 +47,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"