#!/bin/sh
i=0;


usage() {
	echo;
	echo $"usage: go [options to gbkfonts] directory_contain_fonts";
	echo;
	exit 1;
}

for arg in $*; do
	if [[ $arg == -* ]] ; then 
		opts[i++]=$arg;
	elif [ -z $dir ] ; then 
		dir=$arg;
	else usage;
	fi
done

if [ -z $dir ]; then 
	echo $"you need suply a path where your TTF fonts are";
	exit -1;
fi


gbkfonts ${opts[*]} $dir/simsun.ttf song
gbkfonts ${opts[*]} $dir/simkai.ttf kai
gbkfonts ${opts[*]} $dir/simhei.ttf hei
gbkfonts ${opts[*]} $dir/simfang.ttf fs
gbkfonts ${opts[*]} $dir/fzssjw.ttf fzss
gbkfonts ${opts[*]} $dir/fzs3jw.ttf fzs3
gbkfonts ${opts[*]} $dir/fzxkjw.ttf fzxk
gbkfonts ${opts[*]} $dir/fznbsjw.ttf fznbs
gbkfonts ${opts[*]} $dir/fzfsjw.ttf fzfs
gbkfonts ${opts[*]} $dir/fzktjw.ttf fzkt
gbkfonts ${opts[*]} $dir/fzs3jw.ttf fzs3

