#include	<stdio.h>
#include	"xgroups.h"

int main(int argc, char *argv[])
{
	char cmd[PATH_MAX];
	int i;

	for(i=1;i<argc;i++)
	{
		sprintf(cmd,"find %s -name \\*.xpm -print >>%s",argv[i],ICONLIST);
		system(cmd);

		sprintf(cmd,"find %s -name \\*.xbm -print >>%s",argv[i],ICONLIST);
		system(cmd);
	}

	sprintf(cmd,"sort %s | uniq >%s.tmp",ICONLIST,ICONLIST);
	system(cmd);

	sprintf(cmd,"mv %s.tmp %s",ICONLIST,ICONLIST);
	system(cmd);

	sprintf(cmd,"chmod o+r %s",ICONLIST);
	system(cmd);

	return(0);
}

