mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
attempt to detect armv6 and armv7
This commit is contained in:
parent
5552d4f28e
commit
3e32fb100c
3 changed files with 22 additions and 2 deletions
|
@ -11,6 +11,24 @@ pkg_dependencies="postgresql postgresql-contrib"
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
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 armv6)" ]; then
|
||||
architecture="armv6"
|
||||
elif [ -n "$(uname -m | grep armv7)" ]; then
|
||||
architecture="armv7"
|
||||
else
|
||||
architecture="unknown"
|
||||
fi
|
||||
echo $architecture
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -140,7 +140,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
|||
### downloaded from an upstream source, like a git repository.
|
||||
### `ynh_setup_source` use the file conf/app.src
|
||||
|
||||
architecture=$YNH_ARCH
|
||||
# ynh_detect_arch comes from _common.sh / personnal helpers
|
||||
architecture=$ynh_detect_arch
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
|
||||
|
|
|
@ -83,7 +83,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
architecture=$YNH_ARCH
|
||||
# ynh_detect_arch comes from _common.sh / personnal helpers
|
||||
architecture=$ynh_detect_arch
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id=$architecture --keep="config.yaml"
|
||||
|
|
Loading…
Reference in a new issue