From 2bad80e7edd3c0f84718545d9338c8edfed16513 Mon Sep 17 00:00:00 2001 From: Juerg Haefliger Date: Wed, 9 Aug 2023 11:23:58 +0200 Subject: [PATCH] copy-firmware: Support additional compressor options Any options following the compressor option --zstd or --xz are passed on to the compressor as additional options so that - for example - the compression level can be specified: $ ./copy-firmware.sh --zst -19 Signed-off-by: Juerg Haefliger Signed-off-by: Josh Boyer --- copy-firmware.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/copy-firmware.sh b/copy-firmware.sh index 148f0f19..20746a47 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -44,6 +44,14 @@ while test $# -gt 0; do shift ;; + -*) + if test "$compress" = "cat"; then + echo "ERROR: unknown command-line option: $1" + exit 1 + fi + compress="$compress $1" + shift + ;; *) if test "x$destdir" != "x"; then echo "ERROR: unknown command-line options: $*"