#!/bin/sh -e
for theme in data/themes/*; do
	if [ -d "$theme" ]; then
		cd "$theme"
		theme=`basename "$theme"`
		echo "Compiling theme $theme"
		data_path="../../themes_data/$theme"
		for filename in *.edc; do
			edje_cc \
				-id "$data_path/images" \
				-fd "$data_path/fonts" \
				$filename
		done
		cd - > /dev/null
	fi
done

chmod -R 777 ./data/themes/blackwhite
