Globs or Wildcards in scripts?

Charlie Brej plymouth at brej.org
Sun Apr 11 15:44:48 PDT 2010


On 04/11/2010 10:08 PM, Joel Bryan Juliano wrote:
> Hi,
>
> I'm creating a simple slideshow plymouth theme that is very similar to
> the glow example theme, however the images does not contain
> transparency and will scale from 640x480 to the most possible KMS
> resolutions, so I like to write a script for it.

Are you trying to load a set of numbered images into an array?
Is this what you need?:
index = 0;
while (1){
     index_string = index;
     if (index < 10) index_string = "0" + index_string;
     frame_image[index] = ImageNew("base" + index_string + ".png");
     if (!frame_image[index]) break;
     index++;
     }

An old example script did some of these things:
http://cgit.freedesktop.org/plymouth/tree/themes/script/script.script?h=scripted-plugin&id=543f29a5756e6e256d4c078f6c6314d9e185e792


More information about the plymouth mailing list