From f0cb85a506e904f3c99c11ac9a109b790f27e18a Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Fri, 29 Sep 2017 15:20:14 -0400 Subject: [PATCH] When SUBPROJECT environment variable is not set assume it to be "" --- live-build/auto/build | 8 ++--- live-build/auto/config | 30 +++++++++---------- .../ubuntu-cpc/hooks/032-disk-image.binary | 2 +- .../hooks/033-disk-image-uefi.binary | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index aa67ef7b..71d7bd56 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -45,13 +45,13 @@ Expire-Date: 0 lb bootstrap "$@" - if [ "$SUBPROJECT" = minimized ] \ + if [ "${SUBPROJECT:-}" = minimized ] \ && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then # workaround for tzdata purge not removing these files rm -f chroot/etc/localtime chroot/etc/timezone fi - if [ "$SUBPROJECT" = minimized ]; then + if [ "${SUBPROJECT:-}" = minimized ]; then # set up dpkg filters to skip installing docs on minimizedd system mkdir -p chroot/etc/dpkg/dpkg.cfg.d cat > chroot/etc/dpkg/dpkg.cfg.d/excludes <> config/chroot -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/chroot +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/chroot echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary echo "BUILDSTAMP=\"$NOW\"" >> config/binary -echo "SUBPROJECT=\"$SUBPROJECT\"" >> config/binary +echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary case $ARCH+$SUBARCH in armhf+raspi2) @@ -768,7 +768,7 @@ EOF ;; esac -if [ $PROJECT = ubuntu-server ] && [ $SUBPROJECT != live ]; then +if [ $PROJECT = ubuntu-server ] && [ ${SUBPROJECT:-} != live ]; then cat > config/hooks/100-remove-fstab.chroot <> mountpoint/etc/default/grub.d/40-force-partuuid diff --git a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary index ca201bb7..932484ea 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -62,7 +62,7 @@ install_grub() { efi_boot_dir="/boot/efi/EFI/BOOT" chroot mountpoint mkdir -p "${efi_boot_dir}" - if [ "$SUBPROJECT" = minimized ] && [ -n "$partuuid" ]; then + if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then # FIXME: code duplicated between 032-disk-image.binary # and 033-disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images.