mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-12-25 19:45:35 +01:00
flake.nix simplified splashImage changing
Fixed problem that occured when setting custom spalsh image for NixOS
This commit is contained in:
parent
000171da27
commit
d5c82f7213
@ -39,12 +39,8 @@
|
|||||||
--icon ${cfg.icon};
|
--icon ${cfg.icon};
|
||||||
|
|
||||||
if [ -n "${splashImage}" ]; then
|
if [ -n "${splashImage}" ]; then
|
||||||
filename=$(basename -- "${splashImage}")
|
|
||||||
extension="''${filename##*.}"
|
|
||||||
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
cp ${splashImage} $out/grub/themes/${cfg.theme}/background.$extension;
|
${pkgs.imagemagick}/bin/convert ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
cp ${splashImage} $out/grub/themes/${cfg.theme}/background;
|
|
||||||
sed -i "s/background.jpg/background.$extension/g" $out/grub/themes/${cfg.theme}/theme.txt;
|
|
||||||
fi;
|
fi;
|
||||||
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
|
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
|
||||||
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
||||||
|
Loading…
Reference in New Issue
Block a user