dev: add import_assets.sh
This commit is contained in:
parent
ea59cdd8a6
commit
92fbb27f18
2 changed files with 9 additions and 10 deletions
|
@ -1,12 +1,4 @@
|
||||||
# How to import assets?
|
# How to import assets?
|
||||||
1. `sudo apt install magickimage`
|
1. `sudo apt install magickimage`
|
||||||
2. cd to a directory where there is *only* .png files (or subdirectories)
|
2. cd to a directory where there is .png files
|
||||||
3. Execute
|
3. Execute `dev/import_assets.sh`
|
||||||
```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
|
|
||||||
```
|
|
||||||
|
|
7
dev/import_assets.sh
Executable file
7
dev/import_assets.sh
Executable file
|
@ -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
|
Loading…
Add table
Reference in a new issue