build() { theme="$(get_theme "/etc/plymouth/plymouthd.conf")" if [[ "$theme" ]]; then add_file /etc/plymouth/plymouthd.conf else # fallback theme="$(get_theme "/usr/share/plymouth/plymouthd.defaults")" if [[ ! "$theme" ]]; then echo "no theme set for plymouth" exit 1 fi add_file /usr/share/plymouth/plymouthd.defaults fi if [[ ! -d "/usr/share/plymouth/themes/$theme" ]]; then echo "invalid plymouth theme: $theme" exit 1 fi module="$(get_module "$theme")" add_file /usr/share/plymouth/arch-logo.png add_binary /usr/bin/plymouthd add_binary /usr/bin/plymouth add_binary /usr/lib/plymouth/renderers/drm.so add_binary /usr/lib/plymouth/renderers/frame-buffer.so add_binary /usr/lib/plymouth/$module.so add_full_dir /usr/share/plymouth/themes/$theme add_runscript } # $1 = file get_theme() { grep ^Theme= "$1" | cut -d = -f 2- } # $1 = theme get_module() { grep ^ModuleName= "/usr/share/plymouth/themes/$1/$1.plymouth" | cut -d = -f 2- }