--- /dev/null
+#! /bin/sh -e
+#| -*-lisp-*-
+exec sbcl --script "$0" "$0" "$@"
+|#
+
+(require 'sb-executable)
+
+(let* ((args (cdr *posix-argv*))
+ (prog (pop args))
+ (cmd (pop args)))
+ (cond
+ ((string= cmd "build")
+ (let ((rc 0))
+ (dolist (file args)
+ (unless (compile-file file :verbose nil :print nil)
+ (setf rc 1)))
+ (quit :unix-status rc)))
+ ((string= cmd "link")
+ (let ((out (pop args)))
+ (sb-executable:make-executable out args)))
+ (t
+ (format *error-output* "~A: unknown command `~A'~%" prog cmd)
+ (quit :unix-status 1))))