.PHONY: force # I set this up based upon the howto at: # http://familiasanchez.net/~roberto/howtos/debrepository RUNNING=run.stamp QUEUED=queue.stamp all: update # there are unhandled race conditions here, but I'm in a hurry -warner update: @if [ -e $(QUEUED) ]; then \ echo "update already queued, deferring to them"; \ elif [ -e $(RUNNING) ]; then \ echo "update in progress, queueing a new one"; \ touch $(QUEUED); \ else \ echo "running update"; \ $(MAKE) run-update-and-check-for-queued; \ fi run-update-and-check-for-queued: rm -f $(QUEUED) touch $(RUNNING) $(MAKE) run-update-and-mirror if [ -e $(QUEUED) ]; then $(MAKE) run-update-and-check-for-queued; fi rm -f $(RUNNING) run-update-and-mirror: $(MAKE) run-update ~/bin/mirror-debs-to-org.sh run-update: apt-ftparchive generate apt-ftparchive.conf apt-ftparchive -c apt-sid-release.conf release dists/sid/ >dists/sid/Release apt-ftparchive -c apt-etch-release.conf release dists/etch/ >dists/etch/Release apt-ftparchive -c apt-edgy-release.conf release dists/edgy/ >dists/edgy/Release apt-ftparchive -c apt-feisty-release.conf release dists/feisty/ >dists/feisty/Release apt-ftparchive -c apt-gutsy-release.conf release dists/gutsy/ >dists/gutsy/Release apt-ftparchive -c apt-hardy-release.conf release dists/hardy/ >dists/hardy/Release