env-dependent scripts with hashbang line not possible

Bug #1284148 reported by Alexander Pánek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

Note: I am not a Lisp developer, I am merely trying to use a project written in Lisp, using SBCL.

I was trying make a script aware of the fact that sbcl might not be installed in /usr/bin/sbcl, but somewhere else in PATH. However, simply replacing the first line to be:

#!/usr/bin/env sbcl --script

... did not work, as env would complain there is no file called "sbcl --script".

I know I could create an alias and refer to that, but I'd rather find a commonly usable solution that anyone can use.

Any thoughts?

Tags: cli
Revision history for this message
Stas Boukarev (stassats) wrote :

It's a problem with execve(2), not SBCL.

Changed in sbcl:
status: New → Invalid
Revision history for this message
Stas Boukarev (stassats) wrote :

And to accomplish the same thing:

#!/bin/sh
#|
exec sbcl --script "$0" $@
|#

(princ "script")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.