fix cards css generator
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Mon, 4 May 2020 06:40:10 +0000 (08:40 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Mon, 4 May 2020 06:40:10 +0000 (08:40 +0200)
bin/spriter.sh

index 4698d63..f8df9dd 100755 (executable)
@@ -47,9 +47,10 @@ for direction in "" "_ea" "_we"; do
             if [ "$card_id" = "40" ]; then
                 card_id="cover"
             fi
+            card_url=$(echo "$fou" | sed 's@.*/\([^/]\+/[^/]\+$\)@\1@g')
             cat <<EOF >> $cssname
 img[data-card-id="${card_id}${direction}"] {
-    background: url('img/cards_xx${direction}.png') -${x}px -${y}px;
+    background: url('${card_url}${direction}.png') -${x}px -${y}px;
 }
 
 EOF