File tree Expand file tree Collapse file tree
alteriso/src/internal/archiso Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,26 @@ func (p *Profile) generateProfileDefSh(outDir string) error {
5858 return nil
5959}
6060
61+ func (p * Profile ) copySplashImage (outDir string ) error {
62+ if futils .Exists (path .Join (p .Path , "splash.png" )) {
63+ src := path .Join (p .Path , "splash.png" )
64+ dsts := []string {
65+ path .Join (outDir , "syslinux" , "splash.png" ),
66+ }
67+ for _ , dst := range dsts {
68+ if futils .Exists (dst ) {
69+ if err := os .Remove (dst ); err != nil {
70+ return errors .Wrap (err )
71+ }
72+ }
73+ if err := cp .Copy (src , dst ); err != nil {
74+ return errors .Wrap (err )
75+ }
76+ }
77+ }
78+ return nil
79+ }
80+
6181func (p * Profile ) GenArchisoProfile (outDir string ) error {
6282 tempDir , err := os .MkdirTemp (os .TempDir (), "alteriso-*" )
6383 defer func () {
@@ -69,6 +89,7 @@ func (p *Profile) GenArchisoProfile(outDir string) error {
6989
7090 tasks := []func (outDir string ) error {
7191 p .generateBootloaderConfigs ,
92+ p .copySplashImage ,
7293 p .generateProfileDefSh ,
7394 p .copyInjecter ,
7495 p .copyAirootfs ,
You can’t perform that action at this time.
0 commit comments