]> git.proxmox.com Git - mirror_linux-firmware.git/commitdiff
copy-firmware: Support additional compressor options
authorJuerg Haefliger <juerg.haefliger@canonical.com>
Wed, 9 Aug 2023 09:23:58 +0000 (11:23 +0200)
committerJosh Boyer <jwboyer@kernel.org>
Mon, 28 Aug 2023 11:17:16 +0000 (07:17 -0400)
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 <destdir>

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
copy-firmware.sh

index 148f0f199e5f41e15c703f883c6db613f1c2359b..20746a47420b2076ab445c2309169a9edc403977 100755 (executable)
@@ -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: $*"