Add simple filename validation before attempting to download

This commit is contained in:
Robin Schneider 2017-06-16 14:17:19 +02:00
parent ec0383fdbe
commit 397cbf906a
No known key found for this signature in database
GPG Key ID: A81E8006DC95EFE6

View File

@ -183,6 +183,7 @@ $(DEPSDIR)/slice.insert.deps: Makefile
# Useful for looking up firmware versions and the changelog.
# NOTE: Makes an assumption about the Lenovo URL not changing.
%.iso.orig.txt:
perl -e 'die "Was expecting a 8 charactar filename prefix as used by Lenovo." if length("$(subst .iso.orig,,$@)") != (8 + 4)'
wget -O $@ https://download.lenovo.com/pccbbs/mobiles/$(subst .iso.orig,,$@)
# Generate all the orig images so that we can diff against them later