summaryrefslogtreecommitdiff
path: root/subdir.myr
blob: 61962695cbbca3bb2a77fe300d55a99f8d38ff83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use std

use "types.use"
use "util.use"

pkg bld =
	const subdirs	: (p : parser#, subs : byte[:][:], targ : std.option(byte[:]) -> void)
;;

const subdirs = {p, subs, targ
	for s in subs
		match targ
		| `std.None:	/* nothing */
		| `std.Some t:
			if !std.sleq(t, s)
				continue
			;;
		;;

		std.put("Entering directory '%s'\n", s)
		run(p.cmd, s)
		std.put("Leaving directory '%s'\n", s)
	;;
}