mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
[4.3] Use $YNH_ARCH instead of ynh_detect_arch
This commit is contained in:
parent
3af71d03fc
commit
f1e3de0d77
5 changed files with 5 additions and 34 deletions
|
@ -6,7 +6,7 @@
|
||||||
"en": "Trello-like kanban",
|
"en": "Trello-like kanban",
|
||||||
"fr": "Un kanban similaire à Trello"
|
"fr": "Un kanban similaire à Trello"
|
||||||
},
|
},
|
||||||
"version": "5.35~ynh1",
|
"version": "5.35~ynh2",
|
||||||
"url": "https://wekan.github.io",
|
"url": "https://wekan.github.io",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.0"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_detect_arch__2
|
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -37,9 +36,8 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating installation parameters..."
|
ynh_script_progression --message="Validating installation parameters..."
|
||||||
|
|
||||||
architecture=$(ynh_detect_arch)
|
|
||||||
# Check machine architecture (in particular, we don't support ARM and 32bit machines)
|
# Check machine architecture (in particular, we don't support ARM and 32bit machines)
|
||||||
if [ $architecture == "i386" ] || [ $architecture == "arm" ]
|
if [ $YNH_ARCH == "i386" ] || [ $YNH_ARCH == "armel" ]
|
||||||
then
|
then
|
||||||
ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :("
|
ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :("
|
||||||
fi
|
fi
|
||||||
|
@ -104,7 +102,7 @@ ynh_script_progression --message="Setting up source files..."
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH"
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_package_version
|
source ynh_package_version
|
||||||
source ynh_detect_arch__2
|
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -139,9 +138,8 @@ then
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
architecture=$(ynh_detect_arch)
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH"
|
||||||
|
|
||||||
#Copy the admin saved settings from tmp directory to final path
|
#Copy the admin saved settings from tmp directory to final path
|
||||||
cp -af "$tmpdir/.env" "$final_path/.env"
|
cp -af "$tmpdir/.env" "$final_path/.env"
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check the architecture
|
|
||||||
#
|
|
||||||
# example: architecture=$(ynh_detect_arch)
|
|
||||||
#
|
|
||||||
# usage: ynh_detect_arch
|
|
||||||
#
|
|
||||||
# Requires YunoHost version 2.2.4 or higher.
|
|
||||||
|
|
||||||
ynh_detect_arch(){
|
|
||||||
local architecture
|
|
||||||
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"
|
|
||||||
else
|
|
||||||
architecture="unknown"
|
|
||||||
fi
|
|
||||||
echo $architecture
|
|
||||||
}
|
|
Loading…
Reference in a new issue