CUR_REL_PATH := base/keys

include ../../config.mk

KEYLIST = keys.lst

all:

depend:

# Remove any spurious keys that are not in the master list, and add any
# that are missing.  Do this in such a way that valid existing keys are
# not disturbed from their present location.
#
install: $(IRIS_KEYS)
	@for key in `ls -1 $(IRIS_KEYS)` ; do \
	  if ! grep $${key} $(KEYLIST) > /dev/null ; then \
	    echo "Removing $(IRIS_KEYS)/$${key}..." ; \
	    rm -f $(IRIS_KEYS)/$${key} ; \
	  fi ; \
	done
	@for key in `cat $(KEYLIST)` ; do \
	  if [ ! -r $(IRIS_KEYS)/$${key} ] ; then \
	    touch $(IRIS_KEYS)/$${key} ; \
	    chown $(IRIS_USER):$(IRIS_GROUP) $(IRIS_KEYS)/$${key} ; \
	    chmod 0664 $(IRIS_KEYS)/$${key} ; \
	  fi \
	done

test:

uninstall:
	rm -f $(IRIS_KEYS)/*	

clean:
	rm -f *.bak *~
