bin: Point download towards correct model

fix_package_url
Marc 2021-08-23 20:07:08 +01:00
parent b41b65a27c
commit eee956774e
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
1 changed files with 7 additions and 1 deletions

View File

@ -105,7 +105,13 @@ check_for_internet() {
check_for_upgrade() {
echo "Checking for updates"
wget https://downloads.hak5.org/api/devices/sharkjack/firmwares -qO /tmp/firmware_check
URL="https://downloads.hak5.org/api/devices/sharkjack/firmwares"
if [ -f "/etc/shark/cable" ]; then
URL="https://downloads.hak5.org/api/devices/sharkjack-cable/firmwares"
fi
wget $URL -qO /tmp/firmware_check
remote_version=$(cat /tmp/firmware_check | jq -c '.[] | select( .latest_version == true ) | .version' | sed 's/-stable//' | sed 's/"//g')
local_version=$(cat /root/VERSION)