#!/bin/sh
SJISTOEUC="nkf -e"
if [ ! -d olddoc ]; then
	echo "This script should run in the top directory of the package"
	exit 1
fi

for i in readme.1st readme.doc doc/* olddoc/* latex/* macro/* plain/*
do
	trap "[ -f $i.sjis ] && mv $i.sjis $i; \
              echo Interrupt\!: \'$i\' is NOT converted;exit" 1 2 3 15
	mv -f $i $i.sjis
	$SJISTOEUC $i.sjis > $i
	rm -f $i.sjis
	echo "$i:  Done"
done
