shithub: mc

Download patch

ref: 9b51700784b0b76155ad10591b9c224cf80cf3a6
parent: b3e7de02f2cfa3d43b7e03aac491be373b5c46df
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Sep 25 09:38:52 EDT 2014

Add missing file.

--- /dev/null
+++ b/subdir.myr
@@ -1,0 +1,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)
+	;;
+}
+