summaryrefslogtreecommitdiff
path: root/etc/mtree/mkcompat.awk
blob: 635ab2528df8faaee01e87b827da9889be6e6bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
BEGIN { n = 1 }
/^#/ { print }
{
	if (NF > 0 && substr($0, 1, 1) != "#") {
		files[n++] = $0;
	}
	next;
}
END {
	split(COMPATDIRS, dirs);
	for (d in dirs) {
		for (f = 1; f < n; f++) {
			x=files[f]; sub("@ARCH_SUBDIR@", dirs[d], x);
			print x;
		}
	}
}