1#!/bin/bash -e 2 3SCRIPTS_DIR="${SCRIPTS_DIR:-$(dirname "$(realpath "$0")")}" 4 5if [ ! -e "/usr/share/live/build/data/debian-cd/$RK_DEBIAN_VERSION" ]; then 6 echo -e "\e[35m" 7 echo "Your live-build doesn't support $RK_DEBIAN_VERSION" 8 echo "Please replace it:" 9 echo "sudo apt-get remove live-build" 10 echo "git clone https://salsa.debian.org/live-team/live-build.git --depth 1 -b debian/1%20230131" 11 echo "cd live-build" 12 echo "rm -rf manpages/po/" 13 echo "sudo make install -j8" 14 echo -e "\e[0m" 15 exit 1 16fi 17 18# The debian SDK's e2fsprogs doesn't support new features like 19# metadata_csum_seed and orphan_file 20if grep -wq metadata_csum_seed /etc/mke2fs.conf; then 21 echo -e "\e[35m" 22 echo "Your mke2fs is too new: $(mke2fs -V 2>&1 | head -n 1)" 23 echo "Please downgrade it:" 24 "$SCRIPTS_DIR/install-e2fsprogs.sh" 25 echo -e "\e[0m" 26 exit 1 27fi 28