AminetAminet
Search:
84783 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/executehack.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:V1.6 Hack to make Execute recognize #!
Author: pueschel at imsdd.meb.uni-bonn.de
Uploader:pueschel imsdd meb uni-bonn de
Type:util/cli
Architecture:m68k-amigaos
Date:1997-05-24
Download:util/cli/executehack.lha - View contents
Readme:util/cli/executehack.readme
Downloads:667

The Execute Hack:

This is a little hack that makes the execute command recognize
the #! convention in script files. This means: if a script file
starts with, say "#!/bin/sh", as the first line, my Execute
will run sh as an interpreter on the file. All you have to do
is set the s-flag on the script, and it can be used like other
Amiga-OS scripts.

Installation:

Rename c:Execute to C:Execute.orig (it is called by my Execute for
amiga shell scripts).
Copy my Execute to c: (it can be made resident, like the original).
That's all :-)

Use:

Set the s-flag on all sh, csh, perl or whatever-you-use scripts.

From version 1.4 on, the path after the #! will be used to find
the script interpreter. If the interpreter is not found that way,
the AmigaOS path will be searched for the interpreter. 

A resident version of the interpreter will be used if present; remember
however that it might differ from the one pointed to by the #! line.

UNIX style paths will be autoconverted, e.g.:

#!/usr/bin/perl

and

#!usr:bin/perl

are equivalent.

The complete invocation (e.g. perl -i blabla) is set as CLI command
name.

Problems & History:

The original Execute apparently does not use ReadArgs(), so my Execute
does not react exactly the same way when an error occurs.

The first release did not search for scripts, like the original Execute
does. Fixed.

The last component of the search path was ignored. Fixed. Thanks to Gunther
Nikl for the report.

AmigaDOS style paths in the #! line, like #!bin:sh, did not work. Fixed.

Spaces between #! and interpreter name were not properly ignored. Fixed.

The path after #! was ignored. Changed.

The resident list was not really searched. Fixed.

Oops. Version 43.5 only worked with resident Execute.orig. Fixed.
Thanks to Bert Vortman for the report.

OOPS ! Version 43.6 had the same problem with rx ! Path search reinstated
due to popular demand.

Legal Stuff:

There is no warranty. The program is Freeware.

Bug reports & suggestions:

Send bug reports & suggestions to pueschel@imsdd.meb.uni-bonn.de.


Contents of util/cli/executehack.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  842    1184  71.1% -lh5- 1628 May 23  1997 Execute
[generic]                 1611    5106  31.6% -lh5- 243b May 23  1997 Execute.c
[generic]                 1046    2193  47.7% -lh5- 88e5 May 23  1997 executehack.readme
[generic]                   70      80  87.5% -lh5- 5350 May 22  1996 scoptions
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files    3569    8563  41.7%            May 23  1997
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>