You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-server-live/hooks/030-root-squashfs.binary

38 lines
736 B

#!/bin/bash -ex
# vi: ts=4 noexpandtab
#
# Generate a squashfs root and manifest
set -x
echo "030-root-squashfs.binary"
case $IMAGE_TARGETS in
""|*squashfs*)
;;
*)
echo "Skipping squashfs build"
exit 0
;;
esac
if [ -n "$SUBARCH" ]; then
echo "Skipping rootfs build for subarch flavor build"
exit 0
fi
. auto/functions
mkdir binary/boot/squashfs.dir
cp -a chroot/* binary/boot/squashfs.dir
apt-get -qqy install squashfs-tools
squashfs_f="${PWD}/livecd.${PROJECT}.squashfs"
squashfs_f_manifest="${squashfs_f}.manifest"
dpkg-query --admindir=binary/boot/squashfs.dir/var/lib/dpkg -W > ${squashfs_f_manifest}
(cd "binary/boot/squashfs.dir/" &&
mksquashfs . ${squashfs_f} \
-no-progress -xattrs -comp xz )