Created
February 7, 2022 22:16
-
-
Save eguneys/4b126d5a924b3cc2e8d2b43b6a1dcf11 to your computer and use it in GitHub Desktop.
Revisions
-
eguneys created this gist
Feb 7, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/bin/bash FOLDER=$1 OUT=$2 OPTIPNG="D:/programs/optipng-0.7.7-win32/optipng.exe" ASEPRITE="C:/Program Files/Aseprite/aseprite.exe" files="sprites sprites2" 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