#!/bin/sh
# usage:  <t-path>*

while [ $# != 0 ]
do
	D=$1 ; shift
	
	if [ -f $D ]
	then
#		# backup
		S=`nextfile $D`
		mv $D $S
		
#		# copy
		cat $S > $D
		
#		# drop package header #:
		sed -e "s/#://g" < $D > $D.new && mv $D.new $D

#		# convert package separator
		sed -e "s/:\([A-Za-z0-9+@$%^&*_=~<>/!?-]\)/.\1/g" < $D > $D.new && mv $D.new $D

		echo translated $D
	else
		echo "* file $D doesn\'t exist"
	fi
done
	
