all: install
	
build:	clean
	for z in *.zip ;do unzip $$z;done

install: build
	for m in *.mib;do mv $$m usr/share/snmp/mibs/`grep "DEFINITIONS ::= BEGIN" $$m | cut -d " " -f 1`.tmp;done
	for t in usr/share/snmp/mibs/*.tmp; do sed -e 's/_//g' $$t > $${t/tmp/txt};rm $$t;done

clean:
	rm -rf usr/share/snmp/mibs/*.txt
	rm -rf *.mib
