#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros  +Q -m roswell -N roswell -- $0 "$@"
|#
(progn ;;init forms
  (ros:include "util")
  (unless (find-package :uiop)
    (ql:quickload "uiop" :silent t)))

(defpackage :ros.script.ecl-config.3799052406
  (:use :cl :roswell.util))
(in-package :ros.script.ecl-config.3799052406)

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((lisp (parse-version-spec
                (or (ros:opt "*lisp")
                    (ros:opt "default.lisp"))))
         (version (or (second lisp)
                      (ros:opt (format nil "~A.version" (first lisp)) :from-end t)))
         (impl (first lisp)))
    (if (find impl '("ecl"))
        (ros:exec (cons (namestring (merge-pathnames (format nil "impls/~A/~A/~A/~A/bin/ecl-config"
                                                             (uname-m) (uname) impl version)
                                                     (roswell.util:homedir)))
                        argv))
        (ros:quit 1))))

;;; vim: set ft=lisp lisp:
