[plt-scheme] setup-plt

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Mon Mar 28 09:27:23 EST 2005

--- "Arend P. van der Veen" <apvanderveen at att.net> wrote:
> Can anybody provide 
> me simple directions on how compile my library into a plt
> file so that I can install it 

Try the script below.  It is what I use.  This really ought
to be in the Cookbook (hint).


#! /usr/local/bin/mzscheme -qr
;; -*-Mode: scheme-*-
;; ./make-plt name version directory

;; Package directory into file name-version.plt

(require (lib "pack.ss" "setup")
         (lib "match.ss")
         (lib "util.ss" "planet"))

(match argv
  [#(name version directory)
   (printf "Packaging ~a into ~a-~a.plt" directory name
   (pack (string-append name
         (list directory)
         (list (list name))
   (printf "Packaging ~a into a Planet .plt" directory)
   (make-planet-archive directory)]
  [_ (printf (string-append 
              "Usage: make-plt name version directory\n"
              "  name is the name of the collection to
              "  version is the version number of the
              "  directory is where the code to be packaged
is found\n"
              "A file name-version.plt will be created\n"
              "Note: the file will be unpacked into the
same directory as that given in the directory package
above.  For this reason the directory must be a
subdirectory of collects.  I suggest making symlinks from
collects to your working directory.\n"))])

Email: noelwelsh <at> yahoo <dot> com
AIM: noelhwelsh

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.