diff --git a/dev/HOW_TO_IMPORT_ASSETS.md b/dev/HOW_TO_IMPORT_ASSETS.md index 52c1289..21abe38 100644 --- a/dev/HOW_TO_IMPORT_ASSETS.md +++ b/dev/HOW_TO_IMPORT_ASSETS.md @@ -1,12 +1,4 @@ # How to import assets? 1. `sudo apt install magickimage` -2. cd to a directory where there is *only* .png files (or subdirectories) -3. Execute -```sh -for PNG in $(find . -type f -name "*.png") -do - convert "$PNG" -alpha opaque "${PNG%.png}.xpm" - convert "$PNG" -alpha extract "${PNG%.png}.alpha.xpm" - rm "$PNG" -done -``` +2. cd to a directory where there is .png files +3. Execute `dev/import_assets.sh` diff --git a/dev/import_assets.sh b/dev/import_assets.sh new file mode 100755 index 0000000..261bc22 --- /dev/null +++ b/dev/import_assets.sh @@ -0,0 +1,7 @@ +#!/bin/sh +for PNG in $(find . -type f -name "*.png") +do + convert "$PNG" -alpha opaque "${PNG%.png}.xpm" + convert "$PNG" -alpha extract "${PNG%.png}.alpha.xpm" + rm "$PNG" +done