#!/bin/sh
exec lush "$0" "$@"
!#

(libload "libc/shell")

(de findlsh (d)
  (pushd d)
  (prog1 
      (all ((f (sh-find "." "*.lsh"))) (mid f 3))
    (popd)))   

(let ((l (append 
	  (findlsh (concat-fname lushdir "lsh"))
	  (findlsh (concat-fname lushdir "packages"))
	  ;; (findlsh (concat-fname lushdir "local")))
	  )))
  (each ((f l))
    (when (not (member (basename f)
                       '( "dh-compile.lsh"
                          "image-db.lsh"
                          "treebrowser-test.lsh"
                          "conx.lsh"
                          ) ))
      (printf "Processing %s\n" f)
      (libload f) ) ) )

