#!/bin/bash

rm -f README_mod_*.*
rm -f install

	for readme in $(ls */ | grep ^mod_ | sed 's,[/ ].*,/README.*,'); do \
	    if [ -f $readme ]; then \
	        cp $readme README_$(dirname $readme).$(echo $readme | cut -d '.' -f 2); \
echo "$(dirname $readme) /usr/lib/prosody/modules/" >> install; \
	    fi; \
	done
