1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/simple-torrent_ynh.git synced 2024-09-03 20:26:18 +02:00
simple-torrent_ynh/scripts/_common.sh
Éric Gaspar ca9c32e728
Testing (#46)
* Upgrade to 1.3.0
2021-07-14 09:06:51 +02:00

38 lines
1.1 KiB
Bash

#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# 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 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86_64"
else
architecture="unknown"
fi
echo $architecture
}