rpi-update: Warn against unsupported command line parameters

There seem to be users who think passing '-y' or '-v' will do something useful.
Explicitly warn against this.
This commit is contained in:
Dom Cobley
2023-07-24 16:25:15 +01:00
committed by Phil Elwell
parent 495dde84b3
commit 4a73c45eb6

View File

@@ -3,6 +3,14 @@
set -o nounset set -o nounset
set -o errexit set -o errexit
for i in $*; do
if [[ $i == -* ]]; then
echo "rpi-update does not accept command line dash parameters."
echo "See: https://github.com/raspberrypi/rpi-update/blob/master/README.md"
exit 1
fi
done
REPO_URI=${REPO_URI:-"https://github.com/raspberrypi/rpi-firmware"} REPO_URI=${REPO_URI:-"https://github.com/raspberrypi/rpi-firmware"}
REPO_API_URI=${REPO_URI/github.com/api.github.com\/repos} REPO_API_URI=${REPO_URI/github.com/api.github.com\/repos}
REPO_CONTENT_URI=${REPO_URI/github.com/raw.githubusercontent.com} REPO_CONTENT_URI=${REPO_URI/github.com/raw.githubusercontent.com}