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

Arm incompatibility check improvement

This commit is contained in:
yalh76 2019-02-01 19:36:31 +01:00
parent 0993b03595
commit 82f67153cf
7 changed files with 72 additions and 6 deletions

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/detect_arch
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source detect_arch
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# RETRIEVE ARGUMENTS
#=================================================

12
scripts/detect_arch Normal file
View file

@ -0,0 +1,12 @@
#!/bin/bash
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="arm"
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

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source detect_arch
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
@ -20,12 +30,6 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
arch=$(uname -m)
if [[ $arch == arm* ]]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source detect_arch
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# LOAD SETTINGS
#=================================================

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/detect_arch
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================

View file

@ -6,9 +6,19 @@
# IMPORT GENERIC HELPERS
#=================================================
source detect_arch
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE APPLICATION NOT COMPATIBLE WITH ARM
#=================================================
if [ $architecture = "arm" ]
then
ynh_die "WriteFreely not available on Arm"
fi
#=================================================
# LOAD SETTINGS
#=================================================