Compare commits

...

2 Commits

Author SHA1 Message Date
drowley8 07094a0896
Merge 56439067b7 into 2ba051b59b 2025-07-23 18:49:17 -04:00
drowley8 56439067b7
Add quotes to aseprite-thumbnailer
Without quotes, the thumbnailer could silently fail if the source or destination happens to have a space anywhere in the path, e.g. /home/myself/My Sprites/character.aseprite. The quotes help prevent this misunderstanding.
2025-04-28 14:56:47 -06:00
1 changed files with 3 additions and 3 deletions

View File

@ -9,11 +9,11 @@ if [ $# -ge 2 -a $# -lt 4 ]; then
mkdir -p /tmp/Aseprite
filename=${1//\//.}$RANDOM
if [ $# -eq 2 ]; then
aseprite -b --frame-range "0,0" $1 --sheet /tmp/Aseprite/$filename.png
aseprite -b --frame-range "0,0" "$1" --sheet "/tmp/Aseprite/$filename.png"
elif [ $# -eq 3 ]; then
aseprite -b --frame-range "0,0" $1 --shrink-to "$3,$3" --sheet /tmp/Aseprite/$filename.png
aseprite -b --frame-range "0,0" "$1" --shrink-to "$3,$3" --sheet "/tmp/Aseprite/$filename.png"
fi
mkdir -p $(dirname "$2"); mv /tmp/Aseprite/$filename.png $2;
mkdir -p "$(dirname "$2")"; mv "/tmp/Aseprite/$filename.png" "$2";
else
echo "Parameters for aseprite thumbnailer are: inputfile outputfile [size]"
fi