Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -327,10 +327,11 @@ # $(PREFIX)/bin/.$(ARCHSTR)/lib/libxcb-xlib.so.0 # $(PREFIX)/bin/tcmt install : $(PREFIX)/bin/.$(ARCHSTR) $(PREFIX)/bin/.$(ARCHSTR)/mtest $(PREFIX)/bin/megatest \ $(HELPERS) $(PREFIX)/bin/nbfake \ + $(PREFIX)/bin/serialize-env \ $(PREFIX)/bin/nbfind $(PREFIX)/bin/mtrunner $(PREFIX)/bin/mt_xterm \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun \ $(PREFIX)/share/db/mt-pg.sql \ $(PREFIX)/share/js/jquery-3.1.0.slim.min.js Index: serialize-env.scm ================================================================== --- serialize-env.scm +++ serialize-env.scm @@ -1,9 +1,21 @@ -(use z3) -(use base64) +(module serialize-env + * +(import scheme + z3 + base64 + chicken.port + chicken.pretty-print + chicken.process-context + chicken.base + ) +(define (gen-output) (let* ((env-str (with-output-to-string (lambda () (pp (get-environment-variables))))) (zipped-env-str (z3:encode-buffer env-str)) (b64-env-str (base64-encode zipped-env-str))) (print b64-env-str)) - +) +) +(import serialize-env) +(gen-output)