mirror of
https://github.com/Unimatrix0/update_ombi.git
synced 2025-07-06 04:51:53 -07:00
Add support for ARM architecture
This commit is contained in:
parent
2be16cb034
commit
d74234dba6
1 changed files with 10 additions and 3 deletions
|
@ -54,6 +54,8 @@ declare -i verbosity=-1
|
|||
name="update_ombi"
|
||||
version="1.1.02"
|
||||
SECONDS=0
|
||||
arch=$(uname -m)
|
||||
archshort=${arch:0:3}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
|
@ -172,6 +174,11 @@ if [ -z "${port}" ]; then
|
|||
fi
|
||||
|
||||
.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 j=5
|
||||
while [ $i -le $j ]
|
||||
|
@ -192,7 +199,7 @@ do
|
|||
exit 1
|
||||
fi
|
||||
.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"
|
||||
if [ -e $size ]; then
|
||||
if [ $i -lt $j ]; then
|
||||
|
@ -213,7 +220,7 @@ do
|
|||
done
|
||||
tempdir=$(mktemp -d)
|
||||
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..."
|
||||
if [ $(wc -c < $file) != $size ]; then
|
||||
.log 3 "Downloaded file size does not match expected file size...bailing!"
|
||||
|
@ -334,4 +341,4 @@ elif [ $seconds -eq 1 ]; then
|
|||
fi
|
||||
durationmsg="Update complete...elapsed time $duration..."
|
||||
durationmsg="${durationmsg// / }"
|
||||
.log 6 "$durationmsg"
|
||||
.log 6 "$durationmsg"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue