Suppose the system administrator has installed the SWI-Prolog runtime
environment in /usr/local/lib/rt-pl-2.1.4
. A user wants to
install gnat
, but gnat will look for its configuration in
/usr/local/lib/rt-pl-2.1.4/gnat
where the user cannot
write.
The user decides to install the gnat runtime files in
/users/bob/lib/gnat
. For one-time usage, the user may
decide to start gnat using the command:
For a more widely used executable, this is not very comfortable. The user may decide to edit the shell-script part of gnat. Upto the line holding
gnat is a simple /bin/sh script. After this line, the file is
binary and may contain long lines. Most editors are not capable of
editing such files. (28)
Instead of editing the file directly, the program chpl(1)
may be used to extract and replace the header of gnat
. The
following editing sequence will work with any editor capable of editing
ASCII files.
The header may be changed to the following to install gnat properly: