You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
556 B
Bash

#!/bin/sh
# Firmware downloader
DEVICE=NE1D
SERIAL=1133001
VERSION=194
BASEURL=https://updates.netool.io/bin/
wget -O listing.txt $BASEURL
filename=$DEVICE-$VERSION-UP-$SERIAL.bin
rm *.bin*
if cat listing.txt | grep $filename && wget $BASEURL$filename; then
# exact version match
echo $filename > fwname
else
filename=$DEVICE-$VERSION-UP-1133333.bin
if cat listing.txt | grep $filename && wget $BASEURL$filename; then
echo $filename > fwname
else
echo "ERROR: Unable to find firmware!"
rm fwname
fi
fi