--script now passes the script name as a first argument to command-line-arguments

This commit is contained in:
Abdulaziz Ghuloum 2006-12-02 10:29:25 -05:00
parent 2fdaf456f8
commit e32a8cc972
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -71,15 +71,16 @@
(let-values ([(f* script a*) (f (cdr args))])
(values (cons (car args) f*) script a*))]))])
(current-eval compile)
(command-line-arguments args)
(cond
[script ; no greeting, no cafe
(command-line-arguments (cons script args))
(for-each load files)
(load script)
(exit 0)]
[else
(printf "Ikarus Scheme (Build ~a)\n" (compile-time-date-string))
(display "Copyright (c) 2006 Abdulaziz Ghuloum\n\n")
(command-line-arguments args)
(for-each load files)
(new-cafe)]))