1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-22 12:46:19 +00:00
Lakka-LibreELEC/packages/lakka/lakka_tools/lakka_update/sources/lakka-update.sh
2024-05-25 09:20:47 +02:00

26 lines
447 B
Bash

#!/bin/bash
MIRROR=@LAKKA_UPDATE_SERVER_URL@/@LAKKA_TARGET_DEVICE_ARCH@
FILE=`wget $MIRROR/.index -q -O - | head -1`
if [ -z "$FILE" ]; then
echo "Could not find latest update."
exit 1
fi
URL=$MIRROR/$FILE
# cleanup before downloading
rm -rf ~/.update/*
echo ":: Downloading updade"
wget -P ~/.update/ $URL
if [ ! -f ~/.update/$FILE ]; then
echo "Something went wrong during the download."
exit 1
fi
echo ":: Done, you can now reboot"