#!/bin/sh

fatal()
{
	echo "$@" >&2
	exit 1
}

if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
	echo "Usage: $0 [--notest]"
	echo "gittoutf converts git repo to utf-8 if already not converted"
	echo "with --notest will perform really recoding"
	exit 0
fi

for i in * ; do
	if [ "$i" = ".git" ] ; then
		echo "Skip .git dir"
		continue
	fi
	#find $i
	find $i -print0 | xargs -0 toutf $1
done
