installer.ss
(module installer mzscheme
  (require (lib "make.ss" "make"))
  (require (lib "file.ss"))
  (require (lib "process.ss"))
  (provide pre-installer)
  (define (pre-installer PLTHOME directory-path)
    (define (directory-list* dir)
      (map (lambda (x) (build-path dir x)) (directory-list dir)))
    (define (copy-to-dir file dir)
      (copy-file file (let-values (((base name garbage) (split-path file)))
			(build-path dir name))))
    (printf "PLTHOME: ~a\n" PLTHOME)
    (case (system-type)
      ((unix) 
       (parameterize ((current-directory directory-path))
         (system "sh build-allegro.sh")
	 (let ((native-path (build-path "native"
					(system-library-subpath #f))))
	   (make-directory* native-path)
	   (map (lambda (f)
		  (copy-to-dir f (build-path native-path)))
		(directory-list* "allegro-4.2.0/lib/unix"))))
	 ))))