#!/bin/sh
#
# Stupid thing to convert a series file into the names of the corresponding
# txt files.
#

. patchfns 2>/dev/null ||
. /usr/lib/patch-scripts/patchfns 2>/dev/null ||
. $PATCHSCRIPTS_LIBDIR/patchfns 2>/dev/null ||
{
	echo "Impossible to find my library 'patchfns'."
	echo "Check your install, or go to the right directory"
	exit 1
}

if [ $# -lt 1 ]
then
	echo "usage: patch2txt filename(s)"
fi

for i in $*
do
	for j in $(cat $i)
	do
		name=$(stripit $j)
		echo txt/$name.txt
	done
done
