Skip to content

Instantly share code, notes, and snippets.

@eguneys
Created September 9, 2022 14:30
Show Gist options
  • Save eguneys/8fdbc2a2cfb1bb2ab45a0961b454aef9 to your computer and use it in GitHub Desktop.
Save eguneys/8fdbc2a2cfb1bb2ab45a0961b454aef9 to your computer and use it in GitHub Desktop.
Build Aseprite Copy into folder
#!/bin/bash
FOLDER=$1
OUT=$2
OPTIPNG="/mnt/d/programs/optipng-0.7.7-win32/optipng.exe"
ASEPRITE="/mnt/c/Program Files/Aseprite/aseprite.exe"
files="sprites
sprites2
font_sprites"
if [[ $FOLDER == "" || ! -d $FOLDER || $OUT == "" ]]; then
echo "usage: ./save.sh folder outdir"
exit
fi
for filename in $files
do
file="$FOLDER/$filename.aseprite"
if [ -f "$file" ]; then
"$ASEPRITE" -b $file --save-as $FOLDER/export/$filename.png
"$OPTIPNG" -o7 $FOLDER/export/$filename.png
else
echo "skipping $file"
fi
done
scp $FOLDER/export/*.png $OUT/assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment