bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] #!apl


From: Hudson Flavio Meneses Lacerda
Subject: Re: [Bug-apl] #!apl
Date: Tue, 21 Aug 2018 10:24:49 -0300

Hi Jürgen,

Indeed, for my own local computer, I could install apl in /usr.

However, I also use third-part computers as restricted user ($), with apl 
installed in
a different path (under ~/).

Here is my new approach (trying to avoid side effects):

---8<----------------------------------
#!/bin/bash
'true' ⎕EA ''⍝;exec apl -s -f "$0" "$@"
⍝--------------------------------------
'⍝ Body of script'
   ⎕RL←×/⎕TS~0
   ?⍨ 20
'⍝ End of script'
)off
---------------------------------->8---

(That can work fine with bash or dash, but not with sash.)

By the way, why APL files need to start with "#!" to be accept by
)copy/load?

Cheers,
Hudson




On Tue, 21 Aug 2018 11:14:30 +0200
Juergen Sauermann <address@hidden> wrote:

> Hi Hudson,
> 
> you can ./configure GNU APL with prefix=/usr and then recompile and
> install.
> 
> /// Jürgen
> 
> 
> On 08/21/2018 03:34 AM, Hudson Flavio Meneses Lacerda wrote:
> Hi.
> 
> Some of my scripts use `#!/usr/bin/apl --script` (from Debian), but
> now I am using SVN, so I should use `#!/usr/local/bin/apl --script`.
> So, I need to change the scripts, that may be incompatible with
> different environments…
> 
> I have tried:
> 
> #!/usr/bin/env apl
> #!apl --script
> #!/usr/bin/apl --script
> #!/usr/local/bin/apl --script
> 
> So far, the best solution I could find (so that I do not need to
> change the files in the future) is this file header:
> 
> ----------------------------------------------------
> #!
> true ← ~false ← 0 ⍝; exec apl --script "$0" "$@"
> ----------------------------------------------------
> 
> Are there any better solutions?
> 
> Thanks,
> Hudson
> 
> 
> 
> 
> 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]