mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
Update _common.sh
This commit is contained in:
parent
715e6ee32b
commit
b8ff995b62
1 changed files with 11 additions and 10 deletions
|
@ -12,16 +12,17 @@ DATA_PATH="$DATADIR/data"
|
||||||
# See https://en.wikipedia.org/wiki/Uname
|
# See https://en.wikipedia.org/wiki/Uname
|
||||||
ynh_detect_arch(){
|
ynh_detect_arch(){
|
||||||
local architecture
|
local architecture
|
||||||
if [ -n "$(uname -m | grep 64)" ]; then
|
if [ -n "$(uname -m | grep 64)" ]; then
|
||||||
architecture="x86-64"
|
architecture="x86-64"
|
||||||
elif [ -n "$(uname -m | grep 86)" ]; then
|
elif [ -n "$(uname -m | grep 86)" ]; then
|
||||||
architecture="i386"
|
architecture="i386"
|
||||||
elif [ -n "$(uname -m | grep arm)" ]; then
|
elif [ -n "$(uname -m | grep arm)" ]; then
|
||||||
architecture="armv7"
|
architecture="armv7"
|
||||||
else
|
else
|
||||||
ynh_die "Unable to detect your achitecture, please open a bug describing \
|
ynh_die "Unable to detect your achitecture, please open a bug describing \
|
||||||
your hardware and the result of the command \"uname -m\"." 1
|
your hardware and the result of the command \"uname -m\"." 1
|
||||||
fi
|
fi
|
||||||
|
echo $architecture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue