# set -e
# global variables
-GRML_LIVE_VERSION='0.15.1'
+GRML_LIVE_VERSION='0.16.1'
PN="$(basename $0)"
CMDLINE="$0 $@"
ADDONS_LIST_FILE='/boot/isolinux/addons_list.cfg'
echo -ne "\n"
}
-# Copy addonfile $1 from the TEMPLATE_DIRECTORY/compat (if exists),
-# or from $2 (the system path), or warn about the missing file.
+# Copy addonfile $1 from either
+# * the chroot (via $2, the system path),
+# * or from TEMPLATE_DIRECTORY/compat (if exists),
+# * or from the host system (again, using $2),
+# or warn about the missing file.
+#
# This is because:
+# * We assume that the chroot always has a "good" version of
+# the file. Also it makes sources handling easier.
# * On unstable, we Recommend the Debian packages containing
# these files. The user can override them by putting his
-# "better" version into TEMPLATE_DIRECTORY/compat.
+# "better" version into the chroot.
# * On stable, the Debian packages are probably not available,
# or outdated, so we look in TEMPLATE_DIRECTORY/compat first, where
# our grml-live-compat package installs current file versions.
copy_addon_file() {
- if [ ! -d "${BUILD_OUTPUT}/boot/$3/" ]; then
- mkdir -p "${BUILD_OUTPUT}/boot/$3"
+ DEST="${BUILD_OUTPUT}/boot/$3"
+ if [ ! -d "${DEST}/" ]; then
+ mkdir -p "${DEST}"
+ fi
+ if [ -e "$CHROOT_OUTPUT/$2/$1" ]; then
+ log "Copying $1 from chroot"
+ cp "$CHROOT_OUTPUT/$2/$1" "${DEST}/"
+ return $?
fi
if [ -e "${TEMPLATE_DIRECTORY}/compat/$3/$1" ]; then
- cp "${TEMPLATE_DIRECTORY}/compat/$3/$1" "${BUILD_OUTPUT}/boot/$3/"
+ log "Copying $1 from grml-live-compat"
+ cp "${TEMPLATE_DIRECTORY}/compat/$3/$1" "${DEST}/"
return $?
fi
if [ -e "$2/$1" ]; then
log "Copying $1 from system"
- cp "$2/$1" "${BUILD_OUTPUT}/boot/$3/"
+ cp "$2/$1" "${DEST}/"
return $?
fi