Просмотр исходного кода

build-x86-images: Fix passing of additional arguments to mklive

Mklive is called with "$@", to be able to pass additionnal arguments to it.
However, since mklive is called from within a function, the value of "$@" is
the function's argument.

This is fixed by adding "$@" to the function call and using shift after its
first argument (the image flavour) is used.
0x5c 2 лет назад
Родитель
Сommit
c0d8ff0f4d
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      build-x86-images.sh.in

+ 2 - 1
build-x86-images.sh.in

@@ -24,6 +24,7 @@ shift $((OPTIND - 1))
 
 build_variant() {
     variant="$1"
+    shift
     IMG=void-live-${ARCH}-${DATE}-${variant}.iso
     GRUB_PKGS="grub-i386-efi grub-x86_64-efi"
     PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal $GRUB_PKGS"
@@ -81,5 +82,5 @@ if [ ! -x mklive.sh ]; then
 fi
 
 for image in $IMAGES; do
-    build_variant "$image"
+    build_variant "$image" "$@"
 done