mirror of
https://github.com/Unimatrix0/update_ombi.git
synced 2025-07-06 04:51:53 -07:00
Add support for ARM architecture (#28)
This commit is contained in:
parent
0b7974e80a
commit
ae47c73e9c
1 changed files with 10 additions and 3 deletions
|
@ -54,6 +54,8 @@ declare -i verbosity=-1
|
||||||
name="update_ombi"
|
name="update_ombi"
|
||||||
version="1.1.02"
|
version="1.1.02"
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
|
arch=$(uname -m)
|
||||||
|
archshort=${arch:0:3}
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -172,6 +174,11 @@ if [ -z "${port}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.log 6 "Downloading Ombi update..."
|
.log 6 "Downloading Ombi update..."
|
||||||
|
if [ "$archshort" = 'arm' ]; then
|
||||||
|
filename='linux-arm.tar.gz'
|
||||||
|
else
|
||||||
|
filename='linux.tar.gz'
|
||||||
|
fi
|
||||||
declare -i i=1
|
declare -i i=1
|
||||||
declare -i j=5
|
declare -i j=5
|
||||||
while [ $i -le $j ]
|
while [ $i -le $j ]
|
||||||
|
@ -192,7 +199,7 @@ do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
.log 6 "Latest version: $version...determining expected file size..."
|
.log 6 "Latest version: $version...determining expected file size..."
|
||||||
size=$(curl -sL https://ci.appveyor.com/api/buildjobs/$jobId/artifacts | grep -Po '(?<="linux.tar.gz","type":"File","size":)(\d+)')
|
size=$(curl -sL https://ci.appveyor.com/api/buildjobs/$jobId/artifacts | grep -Po '(?<="'$filename'","type":"File","size":)(\d+)')
|
||||||
.log 7 "size: $size"
|
.log 7 "size: $size"
|
||||||
if [ -e $size ]; then
|
if [ -e $size ]; then
|
||||||
if [ $i -lt $j ]; then
|
if [ $i -lt $j ]; then
|
||||||
|
@ -213,7 +220,7 @@ do
|
||||||
done
|
done
|
||||||
tempdir=$(mktemp -d)
|
tempdir=$(mktemp -d)
|
||||||
file="$tempdir/ombi_$version.tar.gz"
|
file="$tempdir/ombi_$version.tar.gz"
|
||||||
wget --quiet --show-progress -O $file "https://ci.appveyor.com/api/buildjobs/$jobId/artifacts/linux.tar.gz"
|
wget --quiet --show-progress -O $file "https://ci.appveyor.com/api/buildjobs/$jobId/artifacts/$filename"
|
||||||
.log 6 "Version $version downloaded...checking file size..."
|
.log 6 "Version $version downloaded...checking file size..."
|
||||||
if [ $(wc -c < $file) != $size ]; then
|
if [ $(wc -c < $file) != $size ]; then
|
||||||
.log 3 "Downloaded file size does not match expected file size...bailing!"
|
.log 3 "Downloaded file size does not match expected file size...bailing!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue