#!/bin/bash
export TARGET_DIRECTORY=${TARGET_DIRECTORY:-"out"}
smilies=(
	'smiley/default'
	'smiley/alpha'
	'smiley/coinface'
	'smiley/aim'
	'smiley/crtface'
	'smiley/eusasmilies'
	'smiley/jcdragons'
	'smiley/msn'
	'smiley/onion'
	'smiley/phpbbb'
	'smiley/phpbby'
	'smiley/ultleob'
	'smiley/ultleog'
	'smiley/ultleor'
	'smiley/ultleow'
	'smiley/ultleoy'
	'smiley/windows98'
	'smiley/xat'
	'smiley/kolobok'
	'smiley/yolks'
)
frames=(
	'frame/win3x.png 24 4 4 5'
	'frame/winxp.png 29 3 3 3'
	'frame/win98.png 23 4 4 4'
	'frame/irix.png 32 8 8 8'
	'frame/gem-amethyst.png 8'
	'frame/gem-diamond.png 8'
	'frame/gem-emerald.png 8'
	'frame/gem-ruby.png 8'
	'frame/gem-sapphire.png 8'
	'frame/ore-bronze.png 8'
	'frame/ore-coloromus.png 8'
	'frame/ore-gold.png 8'
	'frame/ore-silver.png 8'
	'frame/ore-moonstone.png 8'
	'frame/macos7.png 19 2 2 1'
	'frame/macos8.png 22 7 7 6'
	'frame/macosx.png 23 1 1 1'
	'frame/nextstep.png 23 1 1 1'
	'frame/amiga1.png 20 16 18 2'
)
cards=(
	'card/firenevit.gif -'
	'card/worlioblue.png -'
	'card/warpspeed.gif -'
	'card/nyanstars.gif -'
	'card/water.gif -'
	'card/juststeel.png -'
	'card/ranga.png -'
	'card/win3x/win-arcade.gif #008080 #ffffff #000000'
	'card/win3x/win-argyle.gif #000080 #ffffff #000080'
	'card/win3x/win-castle.gif #c0c0c0 - #c0c0c0'
	'card/win3x/win-egypt.gif #808000 - #808080'
	'card/win3x/win-honey.gif #808000 - #ffff00'
	'card/win3x/win-redbrick.gif #800000 #ffffff #000000'
	'card/win3x/win-rivets.gif #008080 - #008080'
	'card/win3x/win-squares.gif #800080 - $800080'
	'card/win3x/win-thatch.gif #ffffff - #ffffff'
	'card/win3x/win-zigzag.gif #008080 #ffffff #008080'
	'card/gridplane/cyberbeige.gif -'
	'card/gridplane/cyberblue.gif -'
	'card/gridplane/cybercyan.gif -'
	'card/gridplane/cybergreen.gif -'
	'card/gridplane/cyberltblue.gif -'
	'card/gridplane/cyberred.gif -'
	'card/gridplane/cyberpurple.gif -'
	'card/gridplane/cyberyellow.gif -'
	'card/plain/black.json -'
	'card/plain/pink.json -'
	'card/plain/white.json -'
	'card/plain/brown.json -'
	'card/plain/green.json -'
	'card/plain/red.json -'
	'card/plain/blue.json -'
	'card/plain/purple.json -'
	'card/plain/black.json -'
	'card/plain/gray.json -'
	'card/plain/orange.json -'
	'card/plain/yellow.json -'
	'card/plain/cyan.json -'
)

echo "== PACKING SMILIES =="
for smiley in "${smilies[@]}"; do
	sh make-smiley.sh $smiley
done
echo "== PACKING FRAMES =="
for frame in "${frames[@]}"; do
	sh make-frame.sh $frame
done
echo "== PACKING CARDS =="
for card in "${cards[@]}"; do
	sh make-card.sh $card
done
