Add gafrc
authorKeith Packard <keithp@keithp.com>
Mon, 21 Jan 2013 07:38:38 +0000 (23:38 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 21 Jan 2013 07:44:22 +0000 (23:44 -0800)
This automatically adds all of the subdirectories of the symbols directory

Signed-off-by: Keith Packard <keithp@keithp.com>
gafrc [new file with mode: 0644]

diff --git a/gafrc b/gafrc
new file mode 100644 (file)
index 0000000..c5cba8f
--- /dev/null
+++ b/gafrc
@@ -0,0 +1,25 @@
+; empty the library path and populate it with only our own symbols
+
+(reset-component-library)
+
+(letrec ((parent "../altusmetrum/symbols")
+        (dport (opendir parent))
+        (do-dirs (lambda (parent dport)
+                   (let ((fname (readdir dport)))
+                     (if (not (eof-object? fname))
+                         (begin
+                          (if (not (string-prefix? "." fname))
+                              (letrec ((subdir (string-append parent "/" fname)))
+                                      (component-library subdir)
+                                      )
+                            )
+                          (do-dirs parent dport)
+                          )
+                       )
+                     )
+                   )
+                 )
+        )
+       (do-dirs parent dport)
+       (closedir dport)
+       )