Skip to content

Instantly share code, notes, and snippets.

@highercomve
Created July 13, 2022 21:53
Show Gist options
  • Save highercomve/ae94752d3d9560c1445968ed6bb3d8a4 to your computer and use it in GitHub Desktop.
Save highercomve/ae94752d3d9560c1445968ed6bb3d8a4 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
echo "Loading latest revision from github"
version=`curl -L 'https://api.github.com/repos/MediaBrowser/Emby.Releases/releases' -H 'Accept: application/vnd.github.v3+json' -H 'Accept-Language: en-US,en;q=0.5' | jq '[.[] | select(.prerelease == false)][0].assets | (.[] | select(.name | contains("arm64.deb")))'`
downloadurl=`echo "$version" | jq -r .browser_download_url`
versionnumber=`echo "$version" | jq -r .name`
echo "You have emby installed with this version"
dpkg -l | grep emby
echo "Do you what to download $downloadurl [yes/y]"
read download
if [ "$download" != "yes" ] && [ "$download" != y ]; then
exit 0
fi
echo "Downloading latest version from: $downloadurl"
curl -L "$downloadurl" -o /tmp/emby_install.deb
echo "Download completed"
echo "Installing $versionnumber"
sudo dpkg --install /tmp/emby_install.deb
rm /tmp/emby_install.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment