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:
parent
0993b03595
commit
82f67153cf
7 changed files with 72 additions and 6 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
12
scripts/detect_arch
Normal 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
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue