nixos/plymouth: exit on missing theme

Much better to provide a helpful message than to
get an obscure sed message.
This commit is contained in:
WORLDofPEACE 2021-02-22 07:35:00 -05:00
parent dd8805658e
commit 726dd9804e

@ -118,6 +118,12 @@ in
copy_bin_and_libs ${pkgs.plymouth}/bin/plymouthd
copy_bin_and_libs ${pkgs.plymouth}/bin/plymouth
# Check if the actual requested theme is here
if [[ ! -d ${themesEnv}/share/plymouth/themes/${cfg.theme} ]]; then
echo "The requested theme: ${cfg.theme} is not provided by any of the packages in boot.plymouth.themePackages"
exit 1
fi
moduleName="$(sed -n 's,ModuleName *= *,,p' ${themesEnv}/share/plymouth/themes/${cfg.theme}/${cfg.theme}.plymouth)"
mkdir -p $out/lib/plymouth/renderers