#!/bin/sh
#|-*- mode:lisp -*-|#
#|Run repl
exec ros -Q -m roswell -N roswell -- $0 "$@"
|#

(progn
  (roswell:include "util"))

(defpackage :ros.script.run.3668210999
  (:use :cl :roswell.util))
(in-package :ros.script.run.3668210999)

(defun main (system script verbose &rest rest)
  (let* ((pos (position #\/ system))
         (version (subseq system (1+ pos)))
         (system% (subseq system 0 pos))
         (verbose (parse-integer verbose :junk-allowed t))
         (func (module "run" system%)))
    (declare (ignorable version verbose))
    (set-opt "impl" system)
    (set-opt "verbose" (format nil "~A" verbose))
    (if func
        (funcall func script rest)
        (progn
          (format *error-output* "not supported impl:~A~%" system)
          (roswell:quit 1)))))
;;; vim: set ft=lisp lisp:
