[armedbear-cvs] r13945 - trunk/abcl/tools

mevenson at common-lisp.net mevenson at common-lisp.net
Thu May 24 11:11:45 UTC 2012


Author: mevenson
Date: Thu May 24 04:11:44 2012
New Revision: 13945

Log:
Start collecting routines for massaging fasl for analysis tools.

Added:
   trunk/abcl/tools/fasl.lisp

Added: trunk/abcl/tools/fasl.lisp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/abcl/tools/fasl.lisp	Thu May 24 04:11:44 2012	(r13945)
@@ -0,0 +1,17 @@
+(in-package :cl-user)
+
+(defun unpack (fasl-path &key (dir (make-temp-directory)))
+  "Unpack compressed fasl at FASL-PATH into 'org/armedbear/lisp' under DIR renaming *.cls to *.class."
+  (let ((pkg-dir (merge-pathnames "org/armedbear/lisp/" dir)))
+    (ensure-directories-exist dir)
+    (sys:unzip fasl-path dir)
+    (ensure-directories-exist pkg-dir)
+    (loop :for fasl :in (directory (merge-pathnames "*.cls" dir))
+       :doing (rename-file 
+               fasl
+               (make-pathname :defaults fasl
+                              :directory (pathname-directory pkg-dir)
+                              :type "class")))
+    dir))
+
+        
\ No newline at end of file




More information about the armedbear-cvs mailing list