From 92fbb27f184ada1c63417f573abe44931f65ee99 Mon Sep 17 00:00:00 2001 From: mcolonna Date: Thu, 4 Apr 2024 15:29:37 +0200 Subject: [PATCH] dev: add import_assets.sh --- dev/HOW_TO_IMPORT_ASSETS.md | 12 ++---------- dev/import_assets.sh | 7 +++++++ 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100755 dev/import_assets.sh 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