#!/bin/echo Source me: .
#
# Copyright (c) 2002-2004 by Frederick Bruckman
# All rights reserved.

# The dependencies are broken down into pairs and topologically
# sorted, courtesy of the "tsort" utility.
#
#     Argument #1: the name of the dir-to-dependents file (input)
#     Argument #2: the name of the tsorted list (output)
# 
tsort_deps () {
	echo "Sorting dirs..." >> /dev/tty
	awk '
	{
		for (i=2; i<=NF; i++)
			print $1 OFS $i
	}' "$1" | tsort > "$2"
}
