#!/bin/sh

find ./ -type f -print | grep \\.decl | sort > tmplist1
cat tmplist1

TOTAL_PKGS=$(wc -l tmplist1)
COUNTER=0

cat tmplist1 | while read DECL
do
	COUNTER=$((COUNTER+1))
	./index-decl.sh "$DECL"
	echo "($COUNTER/$TOTAL_PKGS) $DECL"
done
