livecd-rootfs/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early
Steve Langasek 80cd4153e1 check for glib-compile-schemas presence before calling from the ubuntu hook
This makes the hook ok to use cross-flavor.

We could also move glib-compile-schemas to a separate hook, to ensure we never
silently fail because glib-compile-schemas is broken/missing.
2023-12-20 19:47:14 -08:00

20 lines
301 B
Bash
Executable File

#! /bin/sh
set -eu
case ${PASS:-} in
*.live)
;;
*)
exit 0
;;
esac
cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
LAYERFS_PATH=${PASS}.squashfs
EOF
if which glib-compile-schemas >/dev/null 2>&1; then
glib-compile-schemas /usr/share/glib-2.0/schemas/
fi