shithub: mc

ref: 3456a5b71887bb64aa8eac957a287a78b8ce9f28
dir: /subdir.myr/

View raw version
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)
	;;
}