Created
March 16, 2023 11:50
-
-
Save detain/dc4e5dba27f114b74d4aa10eda4aa5fa to your computer and use it in GitHub Desktop.
Download latest plex .deb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
d="https://plex.tv/downloads/latest/5?channel=16&build=linux-x86_64&distro=debian&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx" | |
n=$(basename $(curl -s -I "$d"|grep "^location"|sed s#"^location: \(.*\)\r"#"\1"#g)) | |
echo "Latest is: $n" | |
if [ ! -e "$n" ]; then | |
echo "Downloading update" | |
wget -q -c "$d" -O "$n" | |
dpkg --install "$n" | |
else | |
echo "Up to date" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment