From eedfa8e5ce995c22a6ba25e4cbb700a718c08df6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Aug 2011 12:37:57 +0200 Subject: Guarding archives handling with an additional check to prevent ugly message about files not existing. --- scripts/build/lb_chroot_archives | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'scripts/build/lb_chroot_archives') diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives index 5c27c1a2c..7bbbba7f4 100755 --- a/scripts/build/lb_chroot_archives +++ b/scripts/build/lb_chroot_archives @@ -262,11 +262,14 @@ EOF for FILE in config/archives/*.list \ config/archives/*.list.chroot do - sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" + if [ -e "${FILE}" ] + then + sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)" + fi done fi @@ -785,11 +788,14 @@ EOF for FILE in config/archives/*.list \ config/archives/*.list.binary do - sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ - -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ - -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ - -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ - "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" + if [ -e "${FILE}" ] + then + sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \ + -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \ + -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION}|g" \ + -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \ + "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)" + fi done fi -- cgit v1.2.3