On 2025-03-12 07:56:52 Rony G. Flatscher wrote:
> On 12.03.2025 12:44, Michael Lueck wrote:
> > Greetings Rony,
> >
> > Rony G. Flatscher wrote:
> >> As such I would assume to be safe to add the hashbang "#!/usr/bin/env
> >> rexx" as the first line directly to all those files that you found not
> >> to have it. Then all Rexx scripts would adhere to the hashbang pattern.
> >
> > Is calling env the multi-ooRexx instance safe method?
> >
> > I have always set my value based on the result of:
> >
> > $ which rexx
> > /usr/local/bin/rexx
> >
> >
> > Also a last step (beyond adding the hashbang) is on Linux file systems,
> > setting the Rexx scrip file to be executable.
>
> What you do is hardcoding the path to your installation of rexx. If rexx
> gets installed to a different directory or if you use the portable version
> of ooRexx then rexx found via the environment variable PATH does not get
> found and does not get used.
>
> The hash bang convention and using env is not a Rexx convention but a
> general Unix convention, hence it makes sense to adhere to it.
>
> ---
>
> Have you already tested your program with 4.2, 5.0.0 and 5.1.0beta?
>
> ---rony
Actually, the proper way on Linux systems is to use the
update-alternatives
tool, which maps multiple versions of a package to a generic name via
symbolic links. It can map the executables, any associated libraries, and
other resources (documentation, samples, etc.) for multiple versions. For
example, for Java:
| 23:58:03 root@pinto
| wd=/usr/local
| ● update-alternatives --display java
| java - auto mode
| link best version is /usr/lib64/jvm/jre-21-openjdk/bin/java
| link currently points to /usr/lib64/jvm/jre-21-openjdk/bin/java
| link java is /usr/bin/java
| slave java.1.gz is /usr/share/man/man1/java.1.gz
| slave jre is /usr/lib64/jvm/jre
| slave keytool is /usr/bin/keytool
| slave keytool.1.gz is /usr/share/man/man1/keytool.1.gz
| slave rmiregistry is /usr/bin/rmiregistry
| slave rmiregistry.1.gz is /usr/share/man/man1/rmiregistry.1.gz
| /usr/lib64/jvm/jre-17-openjdk/bin/java - priority 2705
| slave java.1.gz: /usr/share/man/man1/java-java-17-openjdk.1.gz
| slave jre: /usr/lib64/jvm/jre-17-openjdk
| slave keytool: /usr/lib64/jvm/jre-17-openjdk/bin/keytool
| slave keytool.1.gz: /usr/share/man/man1/keytool-java-17-openjdk.1.gz
| slave rmiregistry: /usr/lib64/jvm/jre-17-openjdk/bin/rmiregistry
| slave
rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-17-openjdk.1.gz
| /usr/lib64/jvm/jre-21-openjdk/bin/java - priority 3105
| slave java.1.gz: /usr/share/man/man1/java-java-21-openjdk.1.gz
| slave jre: /usr/lib64/jvm/jre-21-openjdk
| slave keytool: /usr/lib64/jvm/jre-21-openjdk/bin/keytool
| slave keytool.1.gz: /usr/share/man/man1/keytool-java-21-openjdk.1.gz
| slave rmiregistry: /usr/lib64/jvm/jre-21-openjdk/bin/rmiregistry
| slave
rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-21-openjdk.1.gz
| rc=0
See https://www.man7.org/linux/man-pages/man1/update-alternatives.1.html
Leslie
--
Platform: Linux
Distribution: openSUSE Leap 15.6 - x86_64
Open Object Rexx Version 5.0.0 r12583
Build date: Dec 23 2022
Addressing mode: 64
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel